08-28-2014
Can you re-post your modified code...
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Well, I'm losing my regex ability in sed! Please help.
I need to search for this text in multiple html files in a directory:
</body>
and add the following lines in front of the text above:
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
... (11 Replies)
Discussion started by: Neo
11 Replies
2. Shell Programming and Scripting
Hello,
i have a file like that
foo A new
bar A new
bar B new
I need to replace 'new' with 'done',
but only in lines containing 'bar' AND 'A'.
output file should then become
foo A new
bar A done
bar B new
Sorry im not able to figure it out, not even shure if i should take sed.... (10 Replies)
Discussion started by: knoxo
10 Replies
3. Shell Programming and Scripting
Hello,
I really would appreciate some help with a bash script for some string manipulation on an SQL dump:
I'd like to be able to rename "sites/WHATEVER/files" to "sites/SOMETHINGELSE/files" within the sql dump.
This is quite easy with sed:
sed -e... (1 Reply)
Discussion started by: otrotipo
1 Replies
4. Shell Programming and Scripting
Hi guys,
got a problem here with sed on the command line.
If i have a string as below:
online xx:wer:xcv: sdf:/asdf/http:https-asdfd
How can i match the pattern "http:" and replace the start of the string to the pattern with null?
I tried the following but it doesn't work:
... (3 Replies)
Discussion started by: DrivesMeCrazy
3 Replies
5. Shell Programming and Scripting
I have several files that I need to modify using sed. I know how to do that, but now a new requirement has come up.
Now, I need to make changes to all lines that don't start with certain strings. For example, I need to change all lines except for lines that start with "a", "hello there",... (3 Replies)
Discussion started by: RickS
3 Replies
6. Shell Programming and Scripting
Need help with either sed or awk to acheive the following
file1
-----
In the amazon forest
The bats eat all the time...
mon tue wed they would eat berries
In the tropical forest
The bats eat all the time...
on wed bats eat nuts
In the rain forest
The bats eat all the time...
on... (2 Replies)
Discussion started by: jville
2 Replies
7. Shell Programming and Scripting
I have a file
DS1
DDS
DS
I want to replace only "DS" to "DSmail.blah.com" in a lot of files. I tried
sed 's/DS/DSmail.blah.com' but it changes all the lines .
thanks in advance (2 Replies)
Discussion started by: gubbu
2 Replies
8. Shell Programming and Scripting
Hi All,
I need help in manipulating the data in first column in a file.
The sample data looks like below,
Mon Jul 18 00:32:52 EDT 2011,NULL,UAT
Jul 19 2011,NULL,UAT
1] All field in the file are separated by ","
2] File is having weekly data extracted from database
3] For eg.... (8 Replies)
Discussion started by: gr8_usk
8 Replies
9. Shell Programming and Scripting
Hi ,
I have one file and in this file i have one like
TEST1 KEY0=AAC040R1;AAC041R1ISE;AAC041R2ISE;AAC370R1;ADR0500;ADR0600;AME245R1;AME245R2;BAP0135;BAP0300;PPINVDTD*;PPJERPTD*;PPJERPT*;PRBSUMM*;:
i want to replace this line with the following line
TEST1... (4 Replies)
Discussion started by: ashissau
4 Replies
10. Shell Programming and Scripting
All, I appreciate any help you can offer here as this is well beyond my grasp of awk/sed...
I have an input file similar to:
&LOG
&LOG Part: "@DB/TC10000021855/--F"
&LOG
&LOG
&LOG Part: "@DB/TC10000021852/--F"
&LOG Cloning_Action: RETAIN
&LOG Part: "@DB/TCCP000010713/--A"
&LOG
&LOG... (5 Replies)
Discussion started by: KarmaPoliceT2
5 Replies