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
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...
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 ?
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.