tobold.org

correct • elegant • free

△ comp.unix.shell △

◅ alias qu in ksh

Dealing with spaces in file names in shell scripts... ▻

script to delete first line of files

In article <44v73i$d03@classic.iinet.com.au>,
Murray Barton  <muzza@iinet.net.au> wrote:
>I need a script to delete the first line (only) of a bunch a files.  The
>first line is blank all the other lines in the file start with a
>whitespace and an asterix " *".

Well, I'd simply use my editor...

    $ sam file1 file2 file3 ...
    X 1d
    X w
    q

(`X' means "for each file"; `1d' means "delete line 1"; `w' means
"write"; and `q' means "quit".)

Tim.
--
Tim Goodwin   | "MS-DOS gets this sort of lack of performance automatically,
Unipalm PIPEX | since it tends to busy-wait on everything." -- Chris Torek

Original headers:

From: tim@pipex.net (Tim Goodwin)
Newsgroups: comp.unix.shell
Subject: Re: script to delete first line of files
Date: 9 Oct 1995 16:21:30 GMT
Organization: Unipalm PIPEX
Message-ID: <45bi6a$kpf@wave.news>
References: <44v73i$d03@classic.iinet.com.au>

△ comp.unix.shell △

◅ alias qu in ksh

Dealing with spaces in file names in shell scripts... ▻