08-16-2010
Quote:
Originally Posted by
jimmy_y
Thanks,
If i only run " awk '/</,/>/ {printf $2}' 1.txt", i can get the result, but run "|awk 'gsub(/></,">\n<")'" cannot get.
I guess there are several <abc > tag in your input file, with second awk, it will ouput each record by lines.
For first awk only, you get all datas in one line. if that's your request, it will be fine.
8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
suppose u have a file
ABC CDF ADF FDG HAA AHH AHA
so output shud be like
"ABC" "CDF" "ADF" FDG " "HAA" "AHH" "AHA" (8 Replies)
Discussion started by: cdfd123
8 Replies
2. Shell Programming and Scripting
Hi,
How to find out the words starting with ABC in a file (K shell)
I dont want the word having ABC in middle of any string.
Thanks
Subrat (1 Reply)
Discussion started by: subrat
1 Replies
3. Shell Programming and Scripting
Hi friends,
I want to substitute "a ='....'," with ":" in everywhere in a string using Perl.
Details:
----------
my $str= " c1='fgfasfgasggfgff.,akhkhahha', c2='bbbn', c3='hg5 sh' ";
Required o/p: $str= " c1:c2:c3 "
I tried as below:
$str=~ s/=\'.*\',/:/g ;
print "str=... (14 Replies)
Discussion started by: Niroj
14 Replies
4. Shell Programming and Scripting
Hi Friends
I have one shell script abc.sh
If I run it ./abc.sh and . abc.sh , then what is the difference..
Thanks
Joy:confused: (1 Reply)
Discussion started by: itsjoy2u
1 Replies
5. Shell Programming and Scripting
in a shell script, i hav a variable declared as "ABC-123".
i want to incriment th value ABC-123 by 1 so that the result will be
ABC-124.
Can anyone suggest a solution in shell scripting.. (4 Replies)
Discussion started by: pgmfourms
4 Replies
6. UNIX for Dummies Questions & Answers
Hi everyone
I am new to unix . i got struck up with small issue.
i have text file something like this
abc 'xyz' '5'
pqr 'lmn' '6'
i want to replace
abc 'xyz' '5' with abc 'tyr' '9'
but i know the key 'xyz'
based on the key 'xyz' i want to replace
please help me .
its... (3 Replies)
Discussion started by: Vijayaragavan
3 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I'm trying to do the following and can't figure out how to achieve it.
On my computer there are a number of folders called 'program' at various levels.
I would like to search for these folders (that are below my current level) and then use egrep to search for a string within files that... (6 Replies)
Discussion started by: js8765
6 Replies
8. AIX
In rootvg /abc file is full,I want to increase,but there is no free pps,how will u do it? (1 Reply)
Discussion started by: ramraj731
1 Replies