Powered by Invision Power Board


  Reply to this topicStart new topicStart Poll

> global delete
gilead29
Posted: May 30 2005, 07:12 AM
Quote Post


Newbie
*

Group: Members
Posts: 1
Member No.: 1021
Joined: 30-May 05



Hello,

I have a file like this:
BBR 0029011 090 L $$ap. lea
BBR 0030170 090 L $$aEJOURNAL-ACADEMIC SEARCH
BBR 0030170 090 L $$aEJOURNAL-PROQUEST
BBR 0030453 090 L $$ap. jou
BBR 0030453 090 L $$aEJOURNAL-ACADEMIC SEARCH
BBR 0030453 090 L $$aEJOURNAL-PROQUEST
BBR 0030577 090 L $$ap. cri

I would like to delete lines (gradually) first, line1,4,7
then lines 2, 5
Is there any script or command to do il globally , the file is huge.

Many thanks
PMEmail Poster
Top
vibhor_agarwalin
Posted: May 30 2005, 10:21 AM
Quote Post


User Level: 3
***

Group: Members
Posts: 34
Member No.: 788
Joined: 1-February 05



you can write a small script like:

cat nos
1
4
7
2
5

for i in `cat nos`;
do sed -e "$i/d/"
done;

Not sure of the syntax.
PMEmail Poster
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
« Next Oldest | Shells & Scripting | Next Newest »

Topic Options Reply to this topicStart new topicStart Poll

 



[ Script Execution time: 0.1699 ]   [ 12 queries used ]   [ GZIP Enabled ]




Partners: Cambridge Plus :: <Link Available> :: Electronic Design Bedfordshire :: <Link Available>
Unix Man Pages / Linux Man Pages :: HiFi Forum :: SIP VoIP Phone & Provider Reviews :: UNIX/Linux Forum Archives

More info on advertising on Unix/Linux Forum