|
-
January 11th, 2008, 08:40 PM
#1
Junior Member
UNIX help
hi i'm new to unix and can someone tell me what is doing this
g/^{/.-1p
line in the ed editor in unix? I wrote it in ed but nothing happend!10x
-
January 11th, 2008, 11:56 PM
#2
All newbies must learn man, man man for more info 
I don't get the last p bit?!?
g/<something>/ means print lines that contain <something>. ^ is the start of a line. { is just the karakter {. So g/^{/ means print all lines that begin with {.
A . (dot) means current addres or line and -1 well.. ehm
so if test.txt contains:
Code:
something
test
{ here
there {
Code:
>ed test.txt
30
g/^{/
{ here
g/^{/.-1
test
g/^{/.+1
there {
Oliver's Law:
Experience is something you don't get until just after you need it.
-
January 13th, 2008, 01:46 PM
#3
Junior Member
10x man :} -1 and p i know what they mean,about man u r absolutely right
Similar Threads
-
By gore in forum Operating Systems
Replies: 31
Last Post: June 5th, 2006, 03:50 PM
-
By \/IP3R in forum AntiOnline's General Chit Chat
Replies: 16
Last Post: March 7th, 2005, 10:25 PM
-
By gore in forum Operating Systems
Replies: 1
Last Post: October 12th, 2004, 07:29 AM
-
By -DaRK-RaiDeR- in forum Newbie Security Questions
Replies: 9
Last Post: December 14th, 2002, 08:38 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|