Unix Shell - simple ksh program

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > December 2007 > simple ksh program





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author simple ksh program
Charlie

2007-11-30, 7:23 pm

Hi, I'm new to ksh scripting. I'm looking to copy a single line of
text from different text files and then copy those lines into one new
text file. Any help in this matter would be appreciated.

Thanks,
Charlie
Bill Marcum

2007-11-30, 7:23 pm

On 2007-11-30, Charlie <cfrussell@gmail.com> wrote:
>
>
> Hi, I'm new to ksh scripting. I'm looking to copy a single line of
> text from different text files and then copy those lines into one new
> text file. Any help in this matter would be appreciated.
>
> Thanks,
> Charlie


To get the first line from each file
head -qn1 * >newfile
To get a specific line other than the first, use sed or grep.

Charlie

2007-12-03, 1:28 pm

On Nov 30, 3:50 pm, Bill Marcum <marcumb...@bellsouth.net> wrote:
> On 2007-11-30, Charlie <cfruss...@gmail.com> wrote:
>
>
>
>
>
> To get the first line from each file
> head -qn1 * >newfile
> To get a specific line other than the first, use sed or grep.


Thanks Bill. This got me going.
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2009 webservertalk.com