10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have a file as shown below: myFile.dat
#----------------------------------------------------------
dataFile
{
Name shiva;
location Delhi;
travelID IDNumber;
}
4
(
560065
700007
100001
200002
)... (8 Replies)
Discussion started by: linuxUser_
8 Replies
2. UNIX for Dummies Questions & Answers
Greetings. I have a three column file, and there are some numbers in the second column that are <1. However I need all numbers to be positive, thus need to replace all those numbers with just one. I feel like there must be a simple way to use awk to find these numbers and sed to replace but can't... (5 Replies)
Discussion started by: Twinklefingers
5 Replies
3. Shell Programming and Scripting
File
1,2,33,C,B
3,5,66,K,R
1,2,33,H,M
3,5,66,M,C
6,9,66,J,F
I will use the below command to find and replace in sed, where I'm using variable to find pattern.
while read line
do
sed 's/$line/77/' file
done<inputfile
But here I need to find value in column 3 and... (26 Replies)
Discussion started by: Roozo
26 Replies
4. Shell Programming and Scripting
Hi,
I have a file such that:
tart*)*98'bank'ksb64bank)(tart2d&f44bank
I want to replace to: (only between tart and bank)
tart*)*98'replaced'ksb64bank)(tart2d&f44replaced
Thanks. (6 Replies)
Discussion started by: tara123
6 Replies
5. Shell Programming and Scripting
I need to do a find and replace. I tried below logic but getting warnings Could you please help?
a=`echo "<!DOCTYPE aaaaa bbbbb \"sample.dtd\">"`
b="<!DOCTYPE aaaaa bbbbb \" /a/b/c/datain/d_k/sample.dtd \">"
echo $a | sed -e "s/$a/$b/" > c.txt
getting the following error
sed:... (1 Reply)
Discussion started by: kmanivan82
1 Replies
6. Shell Programming and Scripting
Hi,
I have two files
file1 :>
val="10"
port="localhost:8080"
httpadd="http:\\192.168.0.239"
file2 :>
val=${val}
port=${port}
httpadd=${httpadd}
fileloc=${fileloc}
file3(or file2) should have following output(input from fileone)
file3 (8 Replies)
Discussion started by: nitin.pathak
8 Replies
7. Shell Programming and Scripting
Hi Everyone,
I am new to this forum and new to sed/awk programming too !!
I need to find particular string in file1(text file) and replace it with a value from another text file(file2) the file2 has only one line and the value to be replaced with is in the second column.
file 1:
(assert (=... (21 Replies)
Discussion started by: paramad
21 Replies
8. Shell Programming and Scripting
hi,
i have file say email.temp looks like
Bell_BB 17
Bell_MONTHLY 888
SOLO_UNBEATABLE 721
and another file r3
Bell BB,Bell_BB
Bell,Bell_MONTHLY
SOLO,SOLO_UNBEATABLE
i want email.temp files $1 say Bell_BB should be replaced by r3 Bell BB and Bell_MONTHLY by... (2 Replies)
Discussion started by: raghavendra.cse
2 Replies
9. Shell Programming and Scripting
Hi this is my first time posting ever. I'm relatively new in using AWK/SED, I've been trying many a solution. I'm trying to replace the 59th column in a file where if I encounter '' then I would like to replace it with the word NULL.
example
0 , '' , '' , 0 , 195.538462
change it to
0... (5 Replies)
Discussion started by: gumal901
5 Replies
10. Shell Programming and Scripting
Hi :)
I have some problems with "FOR"...
I have a text file in this format:
name1
www.link1/random_number
name2
www.link2/random_number
name3
www.link3/random_number
...
(Names and info changes)
Now, I need: (4 Replies)
Discussion started by: aspire
4 Replies