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.
korn shell help please
Name: Mei Date: December 14, 2002 at 02:13:15 Pacific OS: sun 5.8 CPU/Ram: sun 5.8
Comment:
I know that grep the_specified_string myfile can finds a line that contains a specified string in a file. How can I reach the same goal in a korn shell script?
Name: David Perry Date: December 14, 2002 at 04:50:45 Pacific
Reply:
#!/bin/ksh grep $1 myfile
There is precious little the korn shell does by itself but it is a wonderful glue.
0
Response Number 2
Name: Jerry Lemieux Date: December 17, 2002 at 07:37:22 Pacific
Reply:
Get a copy of "The New Kornshell" by Morris I. Bolsky and David G. Korn. On page 276 is a version of the grep command written in Kornshell. You can use the logic in the example as a start point. It is essentially an exercise of opening a file, reading in each line and using the Kornshell's builtin pattern matching ability.
I completely disagree with the previous comment that there is precious little the Kornshell does by itself. I have rewritten many scripts and removed unnecessary awk and sed statements from them. Looking at the examples in the book I referenced, one would find the previous statement to be less than accurate.
Summary: I'm trying to write a korn shell script and I'm at my wits end as to how to solve it! The problem I have is that I'm trying to parse a file and edit specific parts of the file. For example, I have 4 r...
Summary: Hello, I have a Korn shell script that is doing some data backup automation in Oracle and I'm stuck on the last step. I am wanting to verify that record count sent to the flat-file equals that in the ...
Summary: Under Korn shell 1. write a script to backup a list of files 2. write a script to finds all soft links to specific file. Your kind help would be appreaciated! Thanks a lot... Sue ...