10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a variable which holds the below value:
echo $FROM_DIR
/fsg/fgldevu/fs_ne/inst/FGLDEVU_01/logs/appl/conc/out/o14946708.out
I want to change the value in the variable as below:
out/o to be replaced with log/l
.out to be replaced with .req
The desired output should look like... (5 Replies)
Discussion started by: Prasannag87
5 Replies
2. Shell Programming and Scripting
Hi ,
i have a file with some data and i need replace a perticular value with some other value from another another file
req:
file1.txt
abc,idle.txt,1234
file2.txt
5678
now the requirement is need to replace the "idle.txt" is with "mike_5678" here 5678 from file2.txt...
file2.txt... (1 Reply)
Discussion started by: dssyadav
1 Replies
3. Shell Programming and Scripting
Hi,
I have to grep value from one file, if that value is already present with "#" symbol. I have to remove that symbol in that file.
Ex:
file1.txt contains the following string
#value=15
I have to search for "Value". If I found the string with hash symbol, nee to remove the # in... (6 Replies)
Discussion started by: ckchelladurai
6 Replies
4. Shell Programming and Scripting
I am very new to unix. Trying to use a for loop for this task
I have a file like this
abc.uml
ccc.uml
ddd.uml
rrr.uml
kkk.uml
.
.
.
n.uml ( more than 10000)
I want to read this file but just 5 names at a time and then again it should read next 5 names and agin next 5. this... (6 Replies)
Discussion started by: nnani
6 Replies
5. Shell Programming and Scripting
Hi All,
How can i replace a pattern where its with the pattern /
To be more clear, this is what am trying to replace with
Current pattern => /abc/xyz
Replace to => /xyz/abc
Giving the commad :%s/"/abc/xyz"/"/xyz/abc"/g throw me off. :wall:
Awaiting for your assistance... (3 Replies)
Discussion started by: kusathy
3 Replies
6. Shell Programming and Scripting
Hi I am very new to shell scripting (and linux in general)...
I am trying to build some script, that will read a person from a csv file, (each person will have an ID, eg id001abc, which will go up one by one a few hundred times) then when find and replace the matching data in an xml file.
... (4 Replies)
Discussion started by: sam.breslin
4 Replies
7. UNIX for Dummies Questions & Answers
I have a tab-delimited inFile:
cat inFile
A B C D E F
1 2 3 4 5 6
a b c d e fI would like to replace the first 3 tabs in each row with underscore to get outFile:
A_B_C_D E F
1_2_3_4 5 6
a_b_c_d e fhow can I modify the following... (5 Replies)
Discussion started by: jdhahbi
5 Replies
8. Solaris
Dear All
To find a file, according to you, I tried as:
#find / -name file-name -print
To find a string inside the files , I tried as :
#find / -name "*" |xargs grep "string"
Can you please let me know how can I try for find/replace (i.e.
finding the intended string inside the text files... (6 Replies)
Discussion started by: hadimotamedi
6 Replies
9. UNIX for Dummies Questions & Answers
After running a command like
grep -ir files2/ *
This will find all the files that contain "files2/" in it.
For example if it finds
files2/dir/today
files2/dir/yesterday
files2/dir/2daysago
Now it may find 100 instances, so is there a quick find and replace command I can use? I... (4 Replies)
Discussion started by: NycUnxer
4 Replies
10. Shell Programming and Scripting
Hi,
Iam new to shell script.How to write bourn shell script for find and replace.
My requirement is:
variable:
name="abcd & co"
i wanted to replace '&' with amp; plz suggest with out using sed.
Thanks lot. (2 Replies)
Discussion started by: ram2s2001
2 Replies