I need to check if directories are created or not. If they are not created I need to create them and again recheck if they have been created and write the success message to a file if created...
I have a Unix Korn shell script that compares the new file with a previous file to create an output file of only the new records. There is an overlap of some of the old records between the pr...
How do I grep for the exact string in a shell script? I have the input customer name to the script. I want to grep for the exact string
I tried grep $customer. But looks for all the words t...
I have to echo an environment which is on a different machine than where I am currently executing the shell script.
ssh user@"$machinename" "echo $WIN" i tried soemthing like this but does...
# client id: 298
298 local:/opt/intrd298.psv: norm /opt/hold OURTXNS nocr schema@schema
298 local:/opt/incpn298.psv: norm /opt/hold OURTXNS nocr schema@schema
298 local:/opt/inbtb298.psv:...
Hi,
I am implementing file transfers using scp over tcp/ip and I need to ensure there is no packet loss.
This is what is happening
1. On Server A - Recvd files say File A is zipped usin...
When I do "ls" I want to loop through the list of files retrieved and parse the files for the date entries in this format Wed Feb 20 03:48:56 EST 2008. Then I want to retrieve the date and wri...
if [[ "$clientExtract" = " " || "$clientRec" = " " || "$clientMachine" = " " || "$clientpost" = " " ]]
then
echo "varibale not created" > error.log
fi
I want to print in the error log...
I want to copy a file from a different machine to my machine.
I followed these steps in my shell scrip
ssh machine2
cd ~client
cp client.file user@machine1:/export/user/home/client...
Hi all,
I am comming along with all this Linus/DB2/scripting business...I am no longer scared of it!! (LOL). But,
I need to create a .ksh script that does a REORGCHK and output only tables r...
I have a KSH script in unix which requires the user to enter some responses (Y or N) at certain intervals of the code. I would like to automate this KSH script by redirecting the standard inpu...
I have about 20 different files all with Oct01, such as claims_line_source.dat_Oct01.
So I just want to strip out Oct01 out of every file name.
Is there an easy way to do this?
I am doing ls -lt and this command sometime lists the year of modification but sometime just lists, Month, Day and the time. I need the Month, Day and the Year of the last modification.
ls ...
I'm looking for a robust way of scripting the following,
either in perl or unix shell script, for AIX
I have two files that get produced each day one will have the first line starting with...
when I ssh into a wrong machine I get an error machine something like this "ssh: jrsa: node name or service name not known" I want to handle this Please advise.
I am new to shell scripting and I am using ksh. I have a shell script to run a list of sql scripts. Below is a sample of how I run the scripts. Now suppose I want to run from the middle of ...
I used the following command to send an email in a shell script
mail -s "Missing Daemons" saibsk@gmail.com < report.out
But sends the email with missing subject. Please advise.
awk -F, '{print $1}' test.csv| while read value
do
echo "$value\n";
done
When I run the above code the case of the value returned is changed to upper case. Like if it was Layer it is cha...
I want to parse a directory and rename all the files with load.xxxx.psv to xxxx.psv using a korn shell script. Please advise.
I have a directory logs which has different sub directories with customers names such as John, Harry, Smith etc.
Each of the sub directories has error.log which is named something like this...
I have a file with list of servernames.
db01a
db01d
I need to do nslookup on them and when I do something like this
nslookup db01a
Server: 05.com
Address: 100.100.00.00
Na...
I have a script that lists the contents of a directory subject to a filename mask.
How do I strip the first 5 characters from each of the filenames in the list?
Hi,
I have a shell scripts which split a file based on the value on the 13th postion of the each line.
If the Value of the 13th position is 'H' this will go to one file and if value is 'D' ...