10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have some code that works more or less. This is called by a make file to adjust some hard-coded definitions in the src code. The script generated some values by looking at some of the src files and then writes those values to specific locations in other files. The awk code is used to... (3 Replies)
Discussion started by: LMHmedchem
2. Shell Programming and Scripting
I want to find common line in two files and replace the next line of first file with the next line of second file. (sed,awk,perl,bash any solution is welcomed ) Case Ignored. Multiple Occurrence of same line.
kgcksdcgfkdsb... (4 Replies)
Discussion started by: madira
3. Shell Programming and Scripting
I have a log file which has sessionids in it, each block in the log starts with a date entry, a block may be a single line or multiple lines. I need to sed (or awk) out the lines/blocks with that start with a date and include the session id.
The files are large at several Gb.
My... (3 Replies)
Discussion started by: andyatit
4. Shell Programming and Scripting
Hey guys. I know pratically 0 about Linux, so could anyone please give me instructions on how to accomplish this ?
The distro is RedHat 4.1.2 and i need to find and replace a multiple lines string in several php files across subdirectories.
So lets say im at root/dir1/dir2/ , when i execute... (12 Replies)
Discussion started by: spfc_dmt
5. Shell Programming and Scripting
I have a section of text in file A, see below
# falkdjf lkjadf lkjadf
lkajdf lkajdf lkajdf lkjadf
Only the first line with "# falkdjf lkjadf lkjadf" is unique in the file. The new section that I want to overwrite the old section above is in... (1 Reply)
Discussion started by: jyang72211
6. Shell Programming and Scripting
Can someone tell me how I can do this?
Say file1.txt contains:
today is monday
the 22 of
and file2.txt contains:
How do i replace the word NOVEMBER with (5 Replies)
Discussion started by: tuathan
7. UNIX for Dummies Questions & Answers
I want to search files (basically .cc files) in /xx folder and subfolders.
Those files (*.cc files) must contain #include "header.h" AND x() function.
I am writing it another way to make it clear,
I wanna list of *.cc files that have 'header.h' & 'x()'. They must have two strings, header.h... (2 Replies)
Discussion started by: ritikaSharma
8. Shell Programming and Scripting
I am creating a script to do a find and replace single/multiple lines in a file with any number of lines.
I have written a logic in a script that reads a reference file say "findrep" and populates two variables $FIND and $REPLACE
print $FIND gives
Hi How r $u
Note:... (0 Replies)
Discussion started by: r_sarnayak
9. Shell Programming and Scripting
I am new to linux and would like to modify the contents of a file preferably using a one line. The situation is as follows
"I am the string"
more lines here
In the above example,On encountering "I am the string", the "replace string "should be... (6 Replies)
Discussion started by: supersimha
10. Shell Programming and Scripting
I am a beginner in shell script.
I was trying to find a way to replace multiple lines of a file with different set of multiple line.
sed -n '/begin/,/end/p' < sample1.txt >test.txt
EDITED=`cat test.txt`... (2 Replies)
Discussion started by: nox