10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have data that looks like this:
<Country code="US"><tag>adsf</tag><tag>bdfs</tag></Country><Country code="CA"><tag>asdf</tag><tag>bsdf</tag></Country>
I want to grab the country code save it, then drop each new "<..." onto a new line with the country code added to the beginning of each
So,... (9 Replies)
Discussion started by: JenniferAmon
9 Replies
2. UNIX for Dummies Questions & Answers
i have a text
20 21 22 23 24 25 26
i want to get 22 using sed back reference.
I have used sed 's/{6}\(..\).*/\1/'
but, it does not work.
I am missing something somewhere.
Please help. (5 Replies)
Discussion started by: gotamp
5 Replies
3. Shell Programming and Scripting
I am trying to change a single line of a special file whose comment character is ! to show a path to the file in the comment. such as:
!!HFSS and mcm path: \Signal_Integrity\Package_SI\Section_Models\C4toTrace\28nm\D6HS\SLC_5-2-5\GZ41_ICZ\NSSS\
to a different path and replace the !!HFSS... (1 Reply)
Discussion started by: mobrien601
1 Replies
4. Shell Programming and Scripting
Hello everbody
I changed one of my important files with a false sed statement by mistake now I lost my file and I hope I could bring it back
what I did was:
sed '/^..//' a > myfile
myfile should have been another file like b ot something I know I also forgot to place an 's' to the... (5 Replies)
Discussion started by: miriammiriam
5 Replies
5. Shell Programming and Scripting
I have:
2012/01_January/Kite/foldername/otherfoldername/placeholderBlue
I want to end up with:
/foldername/otherfoldername/2012/01_January/Kite/Blue
Basically take everything before the first tab and put it in the place of the consistently named word placeholder and add a slash in place... (2 Replies)
Discussion started by: crowman
2 Replies
6. Shell Programming and Scripting
I'm trying to replace an alias with its match using sed but the match contains forward slashs so it causes the sed command to throw a garbled message..
cmd_list.txt sample
AIX_myserver_1011_vintella.sudoers_cmndalias sample
I'm trying to use the below but like I say it throws a... (5 Replies)
Discussion started by: Jazmania
5 Replies
7. Shell Programming and Scripting
My script is as follows:
#!/bin/bash
STR1="test"
echo $STR1
STR2="/bldtmp/"$STR1
echo $STR2
STR3=$STR2'/tmp'
echo $STR3
output i am geting
----------------
test
/bldtmp/test
/tmptmp/test
but my need is:
------------------
test
/bldtmp/test (1 Reply)
Discussion started by: dchoudhury
1 Replies
8. Shell Programming and Scripting
I know you can remove trialing slashes using:
#echo "/tmp/one/two/three////" | sed "s,/$,,"
/tmp/one/two/three///
But I want to know how to make it remove all trialing flashes in the front, and in the start, so the end result is:
tmp/one/two/three
Anyone have any idea how to do this... (6 Replies)
Discussion started by: EXT3FSCK
6 Replies
9. Shell Programming and Scripting
Hi,
I have tried all examples of back referencing from the web but all in vain.
It would be heavily helpful if someone explains me the use of back referencing and sub expression using an example of substitution.
Thanks (1 Reply)
Discussion started by: sinpeak
1 Replies
10. UNIX for Dummies Questions & Answers
I'm pretty new to UNIX and was wondering what is the Unix command for going back one directory? (3 Replies)
Discussion started by: Jatic
3 Replies