Helpp!!


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Helpp!!
# 1  
Old 01-20-2009
Question Helpp!!

Hello

How to Display the odd/even lines from a file..???

how to display the lines containing a string &2 lines before & 2 lines after..???

Thanksss
# 2  
Old 01-20-2009
This sounds like homework.
One way to do the 2 before & after:
2 before and 2 after on Linux:
Code:
grep -A 2 -B 2 'search pattern' filename

# 3  
Old 01-20-2009
hi jim ;

sure its my homework Smilie that i couldn't solve cause i am a beginner ....
so i execute ur command under ksh but my shell reply me that -A and -B illegal options

Smilie
and thanks for ur help
# 4  
Old 01-20-2009
You cannot post homework on the forums. I'm closing the thread.
If you READ what I wrote - I said on linux.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

2 More Discussions You Might Find Interesting

1. Red Hat

Fedora 20 new user and having critical situation !!! Helpp!!!

Hey guys..... Im new user for linux fedora 20.... i really need help ....... i have no idea why suddently when i turn on my laptop fedora turn to be black screen and ask me loging in , when i loging then nothing happen , it stay at the same screen... then i try to go to "with linux secure...,"... (2 Replies)
Discussion started by: asianfootball
2 Replies

2. Shell Programming and Scripting

helpp!

hello i am new at the UNIX programin thing and i have this assignment, which would look so easy for many of u the shell must do the followin thing: exec parameter < input > output and another 1 exec parameter < input | exec2 parameter > output the teacher started it wiz the followin... (1 Reply)
Discussion started by: Hallosss
1 Replies
Login or Register to Ask a Question