Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by bharix

  1. bharix

    how to do multiple inputs into a variable

    #! /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...
  2. bharix

    How to use Array and Arithmetic for in KSH?

    PHV QUOTE "while [[ $i < $NUM_MAX ]]" should it be not ? while (( $i < $NUM_MAX )) can be tricky sometimes.. :-)
  3. bharix

    FTP - Command line restriction

    yes, PHV now thats making more sense. Thanks much for quick help. bharix.
  4. bharix

    FTP - Command line restriction

    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.
  5. bharix

    FTP - Command line restriction

    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...
  6. bharix

    Display special characters. How to?

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

    Redirecting o/p of time command to a file.

    Oh, I figured that out. Sorry.
  8. bharix

    Redirecting o/p of time command to a file.

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

    Robotic interface for passwd changes.

    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...
  10. bharix

    fork or pipe

    #!/usr/bin/ksh print &quot;test&quot;| tee file1 file2 > /dev/null creates two files file1 and file2 with contents &quot;test&quot;. hth bharix
  11. bharix

    Use shell scripting to &quot;cut&quot; a list into columns

    ## ksh ## this could be one approach Emsg=&quot;\n&quot;; while read usr cnt do # print $usr has cnt $cnt if [ $cnt = 0 ] then print $usr has count of $cnt Emsg=&quot;$Emsg\n$usr&quot;; fi done < $FILE3 print $Emsg | mailx -s&quot;Zero count users enclosed&quot; $DISTRO ~ HtH...
  12. bharix

    Capture standard error messages in log

    Worked! Thanks for the reply. Appreciate it. Bharix.
  13. bharix

    Capture standard error messages in log

    Guys, I am writing a ftp script. Sometimes it happens that my ftp session times out showing error on the terminal. &quot;Connection timed out&quot;. 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...
  14. bharix

    Both way communication in one FTP session.

    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...
  15. bharix

    Both way communication in one FTP session.

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

Part and Inventory Search

Back
Top