Computing.Net > Forums > Unix > Kornshell script help is needed

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Kornshell script help is needed

Reply to Message Icon

Name: foad
Date: March 14, 2003 at 00:00:30 Pacific
OS: WIN 2000
CPU/Ram: 523 M
Comment:

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



Sponsored Link
Ads by Google

Response Number 1
Name: WilliamRobertson
Date: March 14, 2003 at 00:49:20 Pacific
Reply:

grep 'File not found' sourcefile > targetfile

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


0

Response Number 2
Name: Emilio Frini
Date: March 14, 2003 at 06:58:56 Pacific
Reply:

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


0

Response Number 3
Name: David Perry
Date: March 20, 2003 at 05:00:58 Pacific
Reply:

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


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Kornshell script help is needed

Need Help with KornShell script www.computing.net/answers/unix/need-help-with-kornshell-script/5978.html

Korn shell script help www.computing.net/answers/unix/korn-shell-script-help/7268.html

Unix Shell Script Help www.computing.net/answers/unix/unix-shell-script-help/7753.html