10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
My text file looks like below
$Bad_ptrq_GTS=rcrd_ip.txt (2 Replies)
Discussion started by: machomaddy
2. 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
3. Shell Programming and Scripting
Unix box server version
--> in this server, I have the path like /IMbuild/dev/im0serv1
---> in that directory I have the folders startup(.jsp files nearly 100 jsp's ) and scripts(contains .js files nearly 100 files) ... (9 Replies)
Discussion started by: pasam
4. 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
5. UNIX for Dummies Questions & Answers
I am sitting on HPUX. I want to change the exit into #exit, which appears into 3red line of code in shell scripting, wondering how shell script to be called up to perform action. I have following code in all files. Now, I need to find the text exit and replace into #exit.
#!/sbin/sh... (10 Replies)
Discussion started by: alok.behria
6. Shell Programming and Scripting
Please let me know how to find text and print text and its previous line. Please don't get irritated few days back I asked text and next line. I am using HP-UX 11.11
Thanks for your help. (6 Replies)
Discussion started by: kamranjalal
7. Shell Programming and Scripting
I have a following task that I need to accomplish through a script or program and I am looking for some help as I have exhausted my ideas.
1. given: a text file with thousands of lines
2. find: pattern A in file and get line number ( grep -n works)
3. find: the first occurence of... (14 Replies)
Discussion started by: PacificWonder
8. 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
9. 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
10. Shell Programming and Scripting
I want to write a small script to search for a text in file and when its found I want to print the next line.
I try to write that script but I could not manage it, I just write the following script the find the exact line but I want the next line.
$ sed -n -e '/Form not/p' test.txt... (2 Replies)
Discussion started by: alijassim