10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
hi,
i have /etc/inittab, I want to add another line after that when i find a pattern "l6:6:wait:/etc/rc.d/rc 6".
original
l6:6:wait:/etc/rc.d/rc 6
after-change
l6:6:wait:/etc/rc.d/rc 6
/sbin/if-pp-to-cng (3 Replies)
Discussion started by: learnbash
3 Replies
2. Shell Programming and Scripting
I had a spot of trouble coming up with a title, hopefully you'll understand once you read my problem... :)
I have the output of an ldapsearch that looks like this:
dn: cn=sam,ou=company,o=com
uidNumber: 7174
gidNumber: 49563
homeDirectory: /home/sam
loginshell: /bin/bash
uid: sam... (2 Replies)
Discussion started by: samgoober
2 Replies
3. Shell Programming and Scripting
Hi All
There is another challenge which stand in front of me. And want all to have the experience with that
I have a file in Unix say a.txt. What I was trying is to read the file line by line and matching the line to particular pattern, and if that pattern found I want to replace that line... (5 Replies)
Discussion started by: adisky123
5 Replies
4. Shell Programming and Scripting
I have a pattern
username:x:32005:32006::/usr/local/user:/bin/bash
I need to match the line containing username and replace /bin/bash with /usr/local/my/bin/noshell
So it becomes
username:x:32005:32006::/usr/local/user:/usr/local/my/bin/noshell (7 Replies)
Discussion started by: anilcliff
7 Replies
5. Shell Programming and Scripting
Hi,
I need help for below scenario.I have a flat file which is having records seperated by delimiters which will represent each record for oracle table.My Control file will consider each line as one record for that table. Some of the lines are aligned in two/three lines so that records are... (4 Replies)
Discussion started by: kannansr621
4 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I have a file with the following content:
---------
a 3242 tc_5 gdfg4
random text
a 3242 tc_6 gdfg4
random text
a 3242 tc_7 gdfg4
random text
a 3242 tc_4 gdfg4
---------
I want to replace the lines containing tc_? (tc_5, tc_6 etc. even with unknown numbers) with the found... (5 Replies)
Discussion started by: joas
5 Replies
7. Shell Programming and Scripting
Hi,
I need to extract <APPNUMBER> tag alone, if the <college> haas IIT Chennai value. college tag value will have spaces embedded. Those spaces should not be suppresses.
My Source file
<Record><sno>1</sno><empid>E0001</empid><name>Rejsh suderam</name><college>IIT ... (3 Replies)
Discussion started by: Sekar1
3 Replies
8. Shell Programming and Scripting
Hi,
suppose i have a txt file containing thye following data
2012156|sb3|nwknjps|BAYONNE|NJ|tcg
201221|094|mtnnjprc:HACKENSACK|NJ|tcg
201222|wn3|mtnnjtc|HACKENSACK|NJ|tcg
2018164|ik4|mtnntc|JERSEY CITY|NJ|tcg
20123482|ik4|mtnnjpritc,JERSEY CITY|NJ|tcg... (3 Replies)
Discussion started by: priyanka3006
3 Replies
9. Shell Programming and Scripting
I thought that this was going to be quit simple using sed but i wasn't able to find a way to delete the second line of a text file if my pattern was not found in the line
With awk i am completly useless :rolleyes:
Any ideas? (2 Replies)
Discussion started by: jepeto
2 Replies
10. Shell Programming and Scripting
I want to change a line like
CPM_THRESHOLD 0.8 //
to a new value using sed
I am trying
sed -i "s/CPM_THRESHOLD/CPM_THRESHOLD\t$COH\t\t\/\//" $INPUT_4
but how can i substitute the whole line begining with CPM_THRESHOLD and substitute it? (2 Replies)
Discussion started by: larne
2 Replies