simple ksh program
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
Re: simple ksh program
On 2007-11-30, Charlie <cfrussell [at] 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.
Re: simple ksh program
On Nov 30, 3:50 pm, Bill Marcum <marcumb... [at] bellsouth.net> wrote:
> On 2007-11-30, Charlie <cfruss... [at] 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.
Thanks Bill. This got me going.