10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello,
Need a little bit of help. Basically I need to replace lines in a file which were calculated wrong as it would 12 hours to regenerate the data. I need to calculate values based on other files which I've managed to figure out with grep/cut but now am stuck on how to shove these new... (21 Replies)
Discussion started by: f77coder
21 Replies
2. Shell Programming and Scripting
Hi all,
I am trying to modify an xml file and I wanted to search and replace using the sed command but here is my issue. I want to search and replace maximumHeapSize="512" and replace it with maximumHeapSize="768" but I have multiple files with different values so I can't search for... (2 Replies)
Discussion started by: reyes99
2 Replies
3. Emergency UNIX and Linux Support
Hi,
I need to run a search and replace on a large database,
what I need to change is all instances of
#### (eg. 1764 or 1964)
to
(####) (eg. (1764) or (1964))
But there might be other numbers in there such as
(1764) and I do not need those changed to ((1764))
How can I... (7 Replies)
Discussion started by: lawstudent
7 Replies
4. Shell Programming and Scripting
Hi all,
I have one question that hopefully isn't too complicated for the more advanced users here. In one of the Solaris KSH scripts I'm working on, is it possible to script the following:
- If there "is" an empty blank line "at the end" of /tmp/text.txt, then remove only that one empty... (3 Replies)
Discussion started by: chatguy
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
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
7. Shell Programming and Scripting
Hi Guys,
Req your help in searching and replacing the word that comes after equals(=) symbol
I would like to replace the sting in bold with a string in variable.
d=ABCDF8C44C22
# grep -i NIM_MASTERID ${_NIMINFO}
export NIM_MASTERID=00CDF8C44C00
I'm looking to replace any word that... (4 Replies)
Discussion started by: ajilesh
4 Replies
8. 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
9. Shell Programming and Scripting
Hi All,
I have a file that I need to be able to find a pattern match on a line, search that line for a text pattern, and replace that text.
An example of 4 lines in my file is:
1. MatchText_randomNumberOfText moreData ReplaceMe moreData
2. MatchText_randomNumberOfText moreData moreData... (4 Replies)
Discussion started by: Crypto
4 Replies
10. 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