sslug-teknik team mailing list archive
-
sslug-teknik team
-
Mailing list archive
-
Message #09347
Re: Fjern linjer fra text fil.
On Wed, 16 Jun 1999, Jesper Monsted wrote:
> On Wed, 16 Jun 1999, Soren Mathiasen wrote:
> > Jeg har en masse tekst filer hvor jeg skal fjerne de første fem linjer,
> > hvordan gør jeg det via et script ?
>
> mkdir nye
> for fil in *; do tail +5 $fil > nye/$fil; done;
Kræver det ikke;
a) bash
b) at der ikke er mellemrum i filen?
a) er nok opfyldt.
b)
mkdir nye
for fil in *; do tail +5 "$fil" > "nye/$fil"; done;
Ikke?
Mads
--
Mads Bondo Dydensborg. madsdyd@xxxxxxxxxxxx
Just because a program takes text commands makes it complex? I love GUI's. I
love using the web. I love WYSIWYG word processors. But I also love CLIs. It
feels more natural to me, as if I'm talking with the computer (granted, the
language isn't english, it's bash, and the vocabulary happens to be whatever's
is my PATH)--I tell it what to do and it does it for me (unlike GUI's where I
have to do everything my own damn self).
- fassler, in response to MS France FUD
Follow ups
References