10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I am fairly new to UNIX and I was wondering if you could provide me with some help! Lets say i have a file as below :
Line 1
Line 2
Line 3
ABC|12|4|2
Now the number 4 in bold, this number will represent the number of row there is in the file excluding the header and footer... (10 Replies)
Discussion started by: Stinza
10 Replies
2. Shell Programming and Scripting
Hi
I want to use awk to match where field 3 contains a number within string - then print the line and just the number as a new field.
The source file is pipe delimited and looks something like
1|net|ABC Letr1|1530|||
1|net|EXP_1040 ABC|1121|||
1|net|EXP_TG1224|1122|||
1|net|R_North|1123|||... (5 Replies)
Discussion started by: Mudshark
5 Replies
3. Shell Programming and Scripting
Sed command to replace a line in a file using line number from the output of a pipe.
Is it possible to replace a whole line piped from someother command into a file at paritcular line...
here is some basic execution flow..
the line number is 412
lineNo=412
Now i have a line... (1 Reply)
Discussion started by: vivek d r
1 Replies
4. Shell Programming and Scripting
Hi Everyone,
I have a file as below:
IM2345638,sherfvf,usha,30
IM384940374,deiufbd,usha,30
IM323763822,cdejdkdnbds,theju,15
0,dhejdncbfd,us,20
IM398202038,dhekjdkdld,tj,30
0,foifsjd,u2,40
The output i need is as below
IM2345638,sherfvf,usha,30... (4 Replies)
Discussion started by: usha rao
4 Replies
5. Shell Programming and Scripting
my requirement is,
consider a file output
cat output
blah sdjfhjkd jsdfhjksdh
sdfs 23423 sdfsdf sdf"sdfsdf"sdfsdf"""""dsf
hellow there
this doesnt look good
et cetc etc
etcetera
i want to replace a line of line number 4 ("this doesnt look good") with some other line
... (3 Replies)
Discussion started by: vivek d r
3 Replies
6. Shell Programming and Scripting
Hi,
I have a set of files in a directory that I have to read and replace the first occurrence of a number with another dummy number. This is what I have so far but it does not seem to work. The files have lot of other data in each row and each data element is separated by ,@,
for file in... (13 Replies)
Discussion started by: scorpioraghu
13 Replies
7. Shell Programming and Scripting
i have something like this,
cat filename.txt
hui this si s"dfgdfg" omeone ipaddress="10.19.123.104" wel hope this works
i want to replace only 10.19.123.104 with different ip say 10.19.123.103
i tried this
sed -i "s/'ipaddress'/'ipaddress=10.19.123.103'/g" filename.txt
... (1 Reply)
Discussion started by: vivek d r
1 Replies
8. Shell Programming and Scripting
Hi experts,
My csv file looks like this
U;cake;michael;temp;;;;
U;bread;john;temp;;;;
U;cocktails;sarah;temp;;;;
I'd like to change the value fo 2nd column to cf+random number , which will look maybe something like this
U;cf20187;michael;temp;;;;
U;cf8926;john;temp;;;;... (7 Replies)
Discussion started by: tententen
7 Replies
9. Shell Programming and Scripting
To trim 3rd field in for all the lines of a file and replace the modified string in that particular field.
For example i have a file called Temp.txt having content
Temp.txt
-----------------
100,234,M1234
400,234,K1734
300,345,T3456
----------------
So the modified file output should... (4 Replies)
Discussion started by: rpadhi
4 Replies
10. Shell Programming and Scripting
hi
i hav a file like
121212 asdd d 7 dfsdffdffsdfsdfsdfdf rrretrtrtre
121212 asdd d 5 dfsdffdffsdfsdfsdfdf rrretrtrtre
121212 asdd d 5 dfsdffdffsdfsdfsdfdf rrretrtrtre
121212 asdd d 4 dfsdffdffsdfsdfsdfdf rrretrtrtre
121212 asdd d 6 dfsdffdffsdfsdfsdfdf rrretrtrtre
i need to... (4 Replies)
Discussion started by: Satyak
4 Replies