Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I need to write a script with kornshell which does this:
THE SCRIPT GOES THROUGH A CERTAIN FILE AND SEARCHES FOR ANY ROW THAT CONTAINS THIS SENTENCE: "File not found". AFTER FINDING ALL THOSE ROWS, IT WILL REDIRECT THOSE ROWS TO ANOTHER FILE.
I preciate any kind of help.
Thanka in advance,
Foad

grep 'File not found' sourcefile > targetfile
Or to append to targetfile instead of overwriting it:
grep 'File not found' sourcefile >> targetfile

I need to create a kornshell script that
include ftp commands .
I already created this shell but I'm not
able to check if the ftp finish well or
not .Any suggestion will be very apreciates .
Thanks and Regards
Emilio Frini
emifrini@tin.it

You need a shell ( like expect ) that can read a return code from the ftp daemon.
110 Restart marker reply. MARK yyyy=mmmm where yyyy is a user process data stream marker, and mmmm is ftpd's equivalent marker
120 Service ready in nnn minutes
200 Command okay
211 System status, or system help reply
212 Directory status
230 User logged in, proceed
250 Requested file action okay, completed
331 User name okay, need password
350 Requested file action pending further information
425 Cannot open data connection
451 Requested action aborted: local error in processing
500 Syntax error, command unrecognized or command line too long
530 Not logged in
550 Requested action not taken; file unavailable, not found, no access

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |