#! /usr/bin/ksh
## a couple of ideas
list=
echo Please enter filenames separated by a space :
read list
echo "You entered : "
for aname in $list
do
echo "name : $aname"
done
## or ##
set -A fname
echo "Enter filenames, one on each line. Enter END to quit the input."
cnt=1...
RodKnowlton -
ff.$$ has space deliminated filenames.
fname1.txt fname2.txt ... fnamen.txt
$(sed 's/^/mdel /' ff.$$)
produces:
mdel fname1.txt fname2.txt etc
so I should be replacing SPACE with CR+mdel
Thanks for your inputs, now I am thinking on correct lines.
bharix.
guys,
take a look at this code snipette,
ftp -ivn <<! >> $LOG_TMP 2>&1
open $FTP1_SRV
user $FTP1_USR $FTP1_PAS
cd $FTP1_BDIR
cd $ADIR
mdel $(< ff.$$)
bye
!
Here the file ff.$$ can have MANY file names which sometimes exceeds the command line length and thus FTP just...
Hi !
I need to know how to display special characters on the terminal and save them in file. (manually or through a process). (characters like ß, ö,ü and ä - a Umlaut)
On my SunOS 5.8 environment, default shell ksh, term vt100,
LANG set to null. I played with LANG settings but could with no...
Hi Guys,
How do I redirect the output of time command to a file?
I use ksh.
e.g.
time ls >> myfile
This command does not put the output of my time command in myfile.
Could you help solving this?
Guys,
Would like to know if it is feasible to change passwords by
using some pre-prepared macro (using load runner or some other utilities) and running it across different hosts to
change a particular user's passwords? (given that old password(s) is known)
Will there be any issues with stty...
## ksh
## this could be one approach
Emsg="\n";
while read usr cnt
do
# print $usr has cnt $cnt
if [ $cnt = 0 ]
then
print $usr has count of $cnt
Emsg="$Emsg\n$usr";
fi
done < $FILE3
print $Emsg | mailx -s"Zero count users enclosed" $DISTRO
~
HtH...
Guys,
I am writing a ftp script. Sometimes it happens that my ftp
session times out showing error on the terminal.
"Connection timed out".
My problem is that I am not able to capture this error message in the log file.
Even though I use following construct, the (error) message
is...
Thanks SamBones - you are correct about ${FLIST} being created
before the ftp call. So I will have to use two ftp sessions in this case. One to read the filenames, second to fetch the files that I am interested in.
NFS option is not viable in my situation since the server where the files are...
Hi All,
This is a snippet of my script:
###
ftp -in $SERVER_IP <<-EOF >> $FTP_LOG
user $LOGIN $PASS
cd $DIR_LOC
dir *.* ${FDIRLIST}
! . ${PARSE_SCR} ${FDIRLIST} ${FLIST}
mget $(< $FLIST)
EOF
###
Description:
In one FTP session I get a long listing of the remote
directory and create a...
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.