I am new to shell script. I have two perl scripts for text processing based on two different input files.I would like to have one shell script that run based on conditions.
if(input file) matches word /extraction_reversed/ run perlscript1.pl otherwise run perlscript2.pl.
Shell script to compile in terminal
sh run.sh inputfile > outputfile
There are two folders named Folder1 and Folder2.
Folder1 has files with name:For example
S-080001-0-0.xml with its corresponding same files in Folder2 named S-080001-0-0.xml
The change in Folder2 is that,for same file in Folder1 which is S-080001-0-0.xml,Folder 2 contains multiple files with different value after hyphen,like -080001-0-0.xml,-080001-0-1.xml,-080001-0-2.xml,-080001-0-3.xml.
My chal
I have made a shell script(/bin/sh) that starts a perl script (that I haven't made my self) that's starts a ssh session. The ssh session uses a private/public key to login so no password is needed. The Perl script works perfect.
But when I put it in a cronjob (crontab) the ssh connection asks for password. This makes the scripts fail. Seems like ssh keys are not working while running in cron.
Is it possible to run a shell script inside a zip folder in Linux?
Hi,
My shell script not getting called through cron job.
The same works fine when executed manually.
I tried to generate logs to find if the scripts has some errors related to path using following command- trying to execute .sh file every 5 mins:
Code:
*/5 * * * * /home/myfolder/abc.sh /home/myfolder/abc.log 2>&1
But even the logs are not getting generated at the mentioned pat
I am beginner to the SHELL SCRIPT and want to Learn SHELL SCRIPT Basics.
This thread should help to all beginners who want to learn SHELL SCRIPT
*** Thanks in advance to those who will contribute on this thread ***
Please guide me and all beginners...
1. Is there any good e-book available? if yes please share links.
2. Where can I try my shell script learning? any online servers available?
3.
I have a Main shell that runs a profile, The profile contains some variables such as Count. When I call the main shell, it loads the profile and then call another shell script. I want that inner shell script be able to access the variable count that the main shell script loaded already. How can I do that ? I tried export but only helped in one level variable import.
I have a folder in my server which contains some files. These are automated that means everyday we get new files automatically which will overwrite the old ones. So want to take a back up for this data. How can i copy all these files in to a another folder by renaming the files with current date while copying.
ex : i have a folder named folder1 which contains 4 files.
Hello,
could you please help me with the following request?
I need a linux command script that does the following.
1. delete folders folder1 and folder2 located in install/users/web/folder1&2.
and also delete folder3 install/jboss/server/folder3. All these folders has many folder and files inside.
2. Reboot the machine
3.