10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Will someone give me an explanation on how the sed command below works.
sed 's/.*//'
Thanks! (3 Replies)
Discussion started by: scj2012
3 Replies
2. Shell Programming and Scripting
I have a XML in which <Amt Ccy="EUR">3.1</Amt> tag repeats. This is under another tag <Main>. I need to sum all the values of <Amt Ccy=""> (Ccy may vary) coming under <Main> using awk and or sed command.
can some help?
Sample looks like below
<root>
<Main>
... (6 Replies)
Discussion started by: bk_12345
6 Replies
3. UNIX for Dummies Questions & Answers
Hi Guys,
Can you help me in creating shell script using sed,awk etc commands to generate csv file using xml file. (5 Replies)
Discussion started by: sbk
5 Replies
4. Shell Programming and Scripting
sed '$!N; /^\(.*\)\n\1$/!P; D'
i found this file which removes duplicates irrespective for sorted or unsorted file. keep first occurance and remove the further occurances.
can any1 explain how this is working..
i need to remove duplicates following file. duplicate criteria is not the... (3 Replies)
Discussion started by: mukeshguliao
3 Replies
5. UNIX for Dummies Questions & Answers
can someone please explain the below sed command..
sed 's/\(*|\)\(.*\)/\2\1/' (6 Replies)
Discussion started by: raghu_shekar
6 Replies
6. Shell Programming and Scripting
This is my first post so hi to you all. I have browsed these forums in the past and what a great community and resource this is! Thanks to all the contributors ... I look forward to being able to give something back.
In the meantime, I have a little conundrum concerning sed. My very simple... (6 Replies)
Discussion started by: Gavster
6 Replies
7. Shell Programming and Scripting
Hi:
I have a collection of mp3s and I need to create 1 xml file per mp3.
I have:
recording1.mp3
recording2.mp3
etc
and I want to generate this kind of files.
recording1.xml
recording2.xml
and inside each xml file I need to add a url prefix and then the filename at the end.
... (4 Replies)
Discussion started by: jason7
4 Replies
8. Shell Programming and Scripting
Hi,
Can someone help me come up with a generic sed command to clean a tag off its attributes?
For eg.
Input String - <tag attrib=new>This String</tag>
should undergo a sed transformation to get
Output String - <tag >This String</tag>
This works -
echo "<tag attrib=new>This</tag>" |... (3 Replies)
Discussion started by: iamwha1am
3 Replies
9. Shell Programming and Scripting
Hi,
The following command works fine for me, but I could not grasp the logic working behind of sed command, it's obscure to me :( :confused:
echo "./20080916/core/audioex.amr" | sed "s%\(\)/%\1_%g"
o/p: ./20080916_core_audioex.amr
Could anyone please explain to me in detail, that how... (6 Replies)
Discussion started by: royalibrahim
6 Replies
10. Shell Programming and Scripting
Hi,
Could you please explain me the below statement -- phrase wise.
sed -e :a -e '$q;N;'$cnt',$D;ba' abc.txt > xyz.txt
if suppose $cnt contains value: 10
it copies last 9 lines of abc.txt to xyz.txt
why it is copying last 9 rather than 10.
and also what is ba and $D over there in... (4 Replies)
Discussion started by: subbukns
4 Replies