10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have text file that looks like this:
bla (9 Replies)
Discussion started by: hench
2. Shell Programming and Scripting
Please help this beginner to write and understand the required script. I am looking for useing awk for sed.
I have a few thousand lines file whose contain are mostly as below and I am trying to achieve followings.
1. Find a string, say user1. Then hash the line containing the... (6 Replies)
Discussion started by: ran_bon_78
3. Shell Programming and Scripting
I know sed and awk has options to give range of line numbers, but
I need to replace pattern in specific lines
sed -e '1s,14s,26s/pattern/new pattern/' file name
Can somebody help me in this....
I am fine with see/awk/perl
Thank you in advance (9 Replies)
Discussion started by: dani777
4. Shell Programming and Scripting
Is there a way with aw to print all lines after a string is found
There is a file like this
2012/19/11 :11.58 PM some data
lne no date
2012/19/11 :11.59 PM some other data
2012/20/11 :12.00 AM some other data
some line without dates
some more lines without dates... (8 Replies)
Discussion started by: swayam123
5. Shell Programming and Scripting
I need to get specific parts in a large file.
I need to:
Get a line containing an IP address, and read from there to another line saying ***SNMP-END***
So, I have the start and the end well defined, but the problem is that apparently the awk command using the -F option doesn't work... (17 Replies)
Discussion started by: ocramas
6. Shell Programming and Scripting
I need a help to search a pattern and print the multiple lines between them.
Tue May 29 12:30:33 EDT 2012:threadWebContainer : 357:com.travimp.hotelierlinks.abba.service.RequestHandler.requestService(String, ITICSDataSet): hotelCancelReservation request: ... (4 Replies)
Discussion started by: aroragaurav.84
7. UNIX for Dummies Questions & Answers
Could someone help me with sed. I have searched for solution 5 days allready :wall:, but cant find. Unfortunately my "sed" knowledge not good enough to manage it. I have the text:
123, foo1, bar1, short text1, dat1e, stable_pattern
124, foo2, bar2, long text
lines, date,... (4 Replies)
Discussion started by: petrasl
8. Shell Programming and Scripting
I would like to delete lines in /etc/hosts on few workstations, basically I want to delete all the lines for a list of machines like this :
for HOST in $(cat stations.lst |uniq)
# echo -n "$HOST"
if ping -c 1 $HOST > /dev/null 2>&1
HOSTNAME_val=`rsh $HOST "sed... (3 Replies)
Discussion started by: albator1932
9. Shell Programming and Scripting
I'm attempting to insert multiple lines before a line matching a given search pattern. These lines are generated in a separate function and can either be piped in as stdout or read from a temporary file.
I've been able to insert the lines from a file after the pattern using:
sed -i '/pattern/... (2 Replies)
Discussion started by: zksailor534
10. Shell Programming and Scripting
I am new to linux and was trying to split some files userwise in our linux server.
I have a data file of 156 continuous columns named ecscr final.
I want the script to redirect all the lines containing a pattern of 7 digits to separate files. I was using grep to do that,... (2 Replies)
Discussion started by: anoopvraj