I have a shell script using ksh which is supposed to transfer file from one Unix server to another using scp. The script is automated using Autosys. Have heard about some authentication public-private keys which would have to be used but am not clear on it.
Any help would be great.
Thanks
Sorry for hooping around so much vgresh99 but i am relatively new to scripting.
Also, PHV the solution you have given does not give me any result.
The FileList.txt has this data :
-rw-r--r-- 1 annay vob_two 0 May 11 16:36 test_20050505_131500.txt
-rw-r--r-- 1 annay vob_two...
I would like to put the following lines of code in a function:
LINE_COUNT=`wc -l ${LOCAL_DIR}/FileList.txt`
COUNT=`echo $LINE_COUNT | cut -s -d' ' -f1`
FILENAME=`cat ${LOCAL_DIR}/FileList.txt | /usr/xpg4/bin/awk -v mycount=${COUNT} 'BEGIN{FS=" "} {if(NR == mycount) {print $9}}'`
The function...
I have a situation wherein i have to check multiple conditions in an 'if' based on some variables. I have given the condition as
if [ ("${VAR1}" == "${VAR2}") || ("${VAR3}" != "${VAR4}") ]
then
.
.
else
.
.
fi
On running the script I am getting a syntax error
syntax error at line number...
Thanks PHV.
I have a list of readyfiles and a list of file to be FTP'ed in the same folder on a FTP server. After each file is written a readyfile is also written on the FTP server. These files are written every 15 mins. Both the pattern of the file names of readyfile and the data files are...
I have a list of files in a folder on a FTP server say a1.txt
b1.txt
a2.txt
b2.txt
a3.txt
b3.txt
I want the list of files starting with 'a'. So I gave ls -ltr a*.txt but it doesn't work.
Any suggestions ?
Thanks PHV but I am not familiar with perl and looks like we have got an syntax error.When I run the script it says `(' unexpected.
I guess this code was for comparing timestamps (Pardon my foolishness but I have started to learn scripting only a couple of days back)
Also,will this work to get...
I am relatively new to shell scripting.
I would like to know how to read the timestamp of a given file present on
a) Unix m/c
b) FTP server
Also, how do i compare two timestamps that I have ?
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.