10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have test.xml
<emp><id>101</id><name>AAA</name><date>06/06/14 1811</date></emp>
<Join><id>101</id><city>london</city><date>06/06/14 2011</date></join>
<Join><id>101</id><city>new york</city><date>06/06/14 1811</date></join>
<Join><id>101</id><city>sydney</city><date>06/06/14... (2 Replies)
Discussion started by: vsraju
2 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I couldn't figure how to extract until last occurence of a character.
I have the string ./dir1/file1/abc.sh
The output should be /dir1/file1
So, the command should display the path until last occurence of "/".
Thanks. (3 Replies)
Discussion started by: rajivn786
3 Replies
3. Shell Programming and Scripting
Please can someone help with this?
I have a file with lines as follows:
word1 word2 word3 word4 word5 word6 word7 word8
word1 word2 word3 word4 word5 word6 word7 word8
word1 word2 word3 word4 word5 word6 word7 word8
word1 word2 word3 word4 word5 word6 word7 word8
When I use the... (7 Replies)
Discussion started by: Subhadeep_Sahu
7 Replies
4. Shell Programming and Scripting
Hi,
In my file (which is "," delimited and text qualifier is "), I have to extract a particualr field.
file1:
1,"aa,b",4
expected is the 2nd field:
aa,b
I tried the basic cut -d "," -f 2 file 1, this gave me
aa alone instead aa,b.
A small hint ot help on this will be very... (5 Replies)
Discussion started by: machomaddy
5 Replies
5. UNIX for Dummies Questions & Answers
does anyone have an awk one-liner to:
print the first line, the second line, then every Nth line, and the last line of a file.
Thanks,
Kenny. (5 Replies)
Discussion started by: kenneth.mcbride
5 Replies
6. Shell Programming and Scripting
Hi,
I have a large file with huge number of records which are of following pattern:
TYPE1
{
originNodeType : "IVR"
originHostName : "AAIVR"
originTransactionID : "01310559"
originTimeStamp : "20110620192440+0530"
hostName : "hhhh"
voucher : '0'D
rProfileID : "ZZZZ"
Before
{
Flags :... (1 Reply)
Discussion started by: madhukar1anand
1 Replies
7. Shell Programming and Scripting
Hello UNIX experts,
I have 124 text files in a directory. I want to extract the 45678th line of all the files sequentialy by file names. The extracted lines should be printed in the output file on seperate lines.
e.g. The input Files are one.txt, two.txt, three.txt, four.txt
The cat of four... (1 Reply)
Discussion started by: yogeshkumkar
1 Replies
8. Shell Programming and Scripting
I have a growing file . I knew only last few lines which is constant for evey job run. I'd need to pull the Nth record from the last line. In this case i should not use search pattern. (2 Replies)
Discussion started by: ford2020
2 Replies
9. Shell Programming and Scripting
folks..
i need a simple one liner to extract data from between the (n)th and (n+1)th instance of a line in a 2 colum file.
eg....for n=3 i should get back
0 1
4 6
help would be much appreciated.
file blah.txt
##################
identifer line
0 3
0 3
identifer line
0 2
0... (5 Replies)
Discussion started by: ryanp200
5 Replies
10. Shell Programming and Scripting
Hi all!!
After experiencing great helpfulness the last time I posted a problem at this site, I once again turn to the forum for expert help.
The problem:
I have a file.dat containing x, y, and z coordinates, like:
x y z
1 1 4
1 2 3
1 3 9
2 1 7
2 2 2
2 3 8
3 1 ... (7 Replies)
Discussion started by: bjorb
7 Replies