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
Charlie [ Fr, 30 November 2007 21:02 ] [ ID #1882452 ]

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.
Bill Marcum [ Fr, 30 November 2007 22:50 ] [ ID #1882455 ]

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.
Charlie [ Mo, 03 Dezember 2007 15:12 ] [ ID #1884296 ]
Linux » comp.unix.shell » simple ksh program

Vorheriges Thema: Veritas Volume manager script
Nächstes Thema: Removing numbers