Re: lug-bg: grep ? cat? tail?
- Subject: Re: lug-bg: grep ? cat? tail?
- From: t.yankov@xxxxxxxxxxxxx (Tosho Yankov)
- Date: Thu, 16 May 2002 09:10:22 +0300
#!/bin/bash
allrow=`wc -l $1|cut -c 1-8`
echo $allrow
needrow=`echo "$allrow - $2"|bc`
echo $needrow
tail -$needrow $1
./script need_file broq_na_1-vite_redove
Tosho Yankov
Support
S&T Bulgaria e.o.o.d.
tel.: +359 52 602 510
fax: +359 52 630 991
e-mail: t.yankov@xxxxxxxxxxxxx
ICQ: 7892403
----- Original Message -----
From: "Minko Markov" <mmarkov@xxxxxxx>
To: <lug-bg@xxxxxxxxxxxxxxxxxx>
Sent: Thursday, May 16, 2002 5:23 AM
Subject: Re: lug-bg: grep ? cat? tail?
> Marian Popov wrote:
> >
> > Zdraveite vsichki.
> >
> > Niakoi sluchaino znae li dali ima niakakva komanda koiato da moje da
> > propusne pyrvite X reda i da otpechata ostanalite ot niakakyv log file ?
>
> Hrumva mi reshenie, no e tromavo i glupavo.
> Napishi shell script, v koyto pqrvo v nyakakva
> promenliva A se slaga broya na redovete (wc -l),
> posle ot A se vadi X, ako rezultatqt e polozhitelen,
> tail -n $A $1
>
> Ne pomnya tochno sintaksisa na bash, za da
> napisha konkreten script. No man bash bi mi
> bilo dostatqchno za celta.
>
> --
> MM
>
============================================================================
> A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers).
> http://www.linux-bulgaria.org - Hosted by Internet Group Ltd. - Stara
Zagora
> To unsubscribe: http://www.linux-bulgaria.org/public/mail_list.html
>
============================================================================
>
============================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers).
http://www.linux-bulgaria.org - Hosted by Internet Group Ltd. - Stara Zagora
To unsubscribe: http://www.linux-bulgaria.org/public/mail_list.html
============================================================================
|