10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file which requires modification via a shell script.
Need to do the following: 0. take input from user for new text. 1. search for a keyword in the file. 2. replace the line next to this to this keyword with user supplied input.
for e.g., my file has the following text:
(some... (7 Replies)
Discussion started by: chingupt
2. Shell Programming and Scripting
I need your help for a specific sed command that would search for a multi line pattern and if found, would replace it by another multi line pattern.
For instance, here is the input:
... (0 Replies)
Discussion started by: xciteddd
3. UNIX for Dummies Questions & Answers
Ive spent ages trying to find an explanation for how to do this on the web, but now feel like I'm :wall:
I would like to change each occurence (there are many within my script) of the following:
in Vim. I know how to search and replace when it is just single lines... (2 Replies)
Discussion started by: blueade7
4. Shell Programming and Scripting
I am looking for any script which can do the following.
have to read a pattern from fileA and copy it to fileB.
Header (3 Replies)
Discussion started by: anilvk
5. Shell Programming and Scripting
i want to search particular string and want to replance next line value.
following is the test file.
search string is
,10:1 "???" may contain any 3 character it should remain the same and next line replace with ,10:50
tmp,123 --- if match tmp,??? then... (3 Replies)
Discussion started by: arvindng
6. Shell Programming and Scripting
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
7. Shell Programming and Scripting
i want to search two pattern on same line and replace onther pattern..
aaaa bbbbb nnnnnn ttttt
cccc bbbbb nnnnnn ppppp
dddd ccccc nnnnnn ttttt
ffff bbbbb oooooo ttttt
now i want replace this matrix like.. i want search for "bbbbb","nnnnnn" and search and replace for... (4 Replies)
Discussion started by: nitindreamz
8. Shell Programming and Scripting
I have a requirement where I have to find a pattern in a file and comment the whole line containing the search pattern. Any ideas in shell is welcome.
Thanks in advance,
Arun (3 Replies)
Discussion started by: arun_maffy
9. Shell Programming and Scripting
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
10. Shell Programming and Scripting
I need to search for a mult-line text in a file exfile1 and replace that text with another text. The text to search for is in exfile2 and the replacement text is in exfile3.
I work with kornshell under AIX and need to do this with a lot of files. (the file type is postscript and they need... (10 Replies)
Discussion started by: marz