10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Lets say I have a massive directory which is filled with other directories all filled with different c++ scripts and I want a listing of all the scripts that contain the string: "this string". Is there a way to use a grep search for that? I tried:
grep -lr "this string" *
but I do not... (3 Replies)
Discussion started by: Circuits
2. Shell Programming and Scripting
I have a verilog file as following (part of it):
bw_r_rf16x32 AUTO_TEMPLATE (
1957 // .rst_tri_en (mem_write_disable),
1958 .rclk (clk),
1959 .bit_wen (dva_bit_wr_en_e),
1960 .din ... (5 Replies)
Discussion started by: Zam_1234
3. Shell Programming and Scripting
Have a string as below in a file.
"anohter boy has id 000921 and girl has id=655 of roll number"
using grep below commands with grep commands but able to get one string at a time, not able to append.
less <filename> | grep -o -P '(?<=id ).*(?=and )'
less <filename> | grep -o -P... (1 Reply)
Discussion started by: Satyak
4. Shell Programming and Scripting
I want to search a string/substring from the second column in file in another file and append the first found record in second file to the end of the record in the first file. Both files are tab delimited.
All lines with KOG in col13 do not need to be searched as it will not be... (7 Replies)
Discussion started by: gina.lizar
5. Shell Programming and Scripting
I have file .
I would like to append a string "Today " so the output is
Hello World Today
I dont know which line number does the "Hello World" appears otherwise I could have used the Line number to search and append . (3 Replies)
Discussion started by: gubbu
6. Shell Programming and Scripting
I am new to Unix. Please help me in finding solution for the below scenario.
I have a flat file that contains data like
351049045|239|new_351049045|JIM|COOK|351049045|Rew|||||||... (6 Replies)
Discussion started by: anandek
7. Shell Programming and Scripting
I have a file myhost.txt which contains below,
126.96.36.199 atrpx958zone nsybhost
I need to append words only after "atrpx958" like 'myhost' and 'libhost' and not after atrpx958zone.
How to search the word atrpx958 only in... (2 Replies)
Discussion started by: gsreeni
8. Shell Programming and Scripting
I am trying to search for a particular occurrence of a string in a file, and if found, append another string to the end of that line.
Here is my file contents:
column1 userlist default nowrite=3 output=4
column2 access default nowrite=3
Here is the code:
A="user=1... (1 Reply)
Discussion started by: bludhemn
9. Shell Programming and Scripting
I want search two lines and append some string in between these lines.
5,3:21.Output should be
tmp,2:19800 (4 Replies)
Discussion started by: arvindng
10. Shell Programming and Scripting
I stuck up for the logic, how to implement the below thing in script.
-Search for <a class="string-array"> line and in next line of search string append with <string>java</string> in a xml file
The problem here is, <a class="string-array"> occurs multiple places in the xml. I just... (13 Replies)
Discussion started by: vino_hymi