10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi. How can I read row number from one file and print that corresponding record present at that row in another file.
eg
file1
1
3
5
7
9
file2
11111
22222
33333
44444
55555
66666
77777
88888
99999 (3 Replies)
Discussion started by: Abhiraj Singh
3 Replies
2. Shell Programming and Scripting
Hi.
How can we print those rows of file2 which are mentioned in file1. first character of file1 is a row number.. for eg
file1
1:abc
3:ghi
6:pqr
file2
a abc
b def
c ghi
d jkl
e mno
f pqr
... (6 Replies)
Discussion started by: Abhiraj Singh
6 Replies
3. UNIX for Dummies Questions & Answers
I have a fixed length file and I want to find out row number along with row length.
I have a program that give me the line length if it satisfy the condition; but i would like to add row number as well?
How do I do that?
while IFS= read -r line; do
if ; then
echo ${line}
echo... (8 Replies)
Discussion started by: princetd001
8 Replies
4. Shell Programming and Scripting
I've got two different files and want to compare them.
File 1 :
HTML Code:
<response ticketId="944" type="getQueryResults"><status>COMPLETE</status><description>Query results fetched successfully</description><recordSet totalCount="1" type="sms_records"><record... (1 Reply)
Discussion started by: Shaishav Shah
1 Replies
5. Shell Programming and Scripting
Hi Power User,
I'm trying to compute this kind of text file format:
file1:
jakarta 100 150
jakarta 170 210
beijing 220 250
beijing 260 280
beijing 290 320
new_york 330 350
new_york 370 420
tokyo 430 470
tokyo 480 ... (2 Replies)
Discussion started by: anjas
2 Replies
6. Shell Programming and Scripting
I want to put one xml record in one row and so on...
sample two records are here.
<?xml version="1.0"?>
<Object>
<Header>
<XCOMVers>V1.0</XCOMVers>
<REPORT>XXXXX</REPORT>
<CODE>002</CODE>
</Header>
<IssueCard>
<Record>
<L>CAR SYSTEM -SSSSS -</L>
... (3 Replies)
Discussion started by: sene_geet
3 Replies
7. Shell Programming and Scripting
I want to put one xml record in one row and so on...
sample two records are here.
<?xml version="1.0"?>
<Object>
<Header>
<XCOMVers>V1.0</XCOMVers>
<REPORT>XXXXX</REPORT>
<CODE>002</CODE>
</Header>
<IssueCard>
<Record>
<L>CAR SYSTEM -SSSSS -</L>
... (1 Reply)
Discussion started by: sene_geet
1 Replies
8. Shell Programming and Scripting
Hallo,
im basically a complete noob on shell scripting and im trying to replace or rather add 1 to a number between xml tags.
The xml basically has a tag somewhere that looks like this:
<tag>12345678901234</tag>
Now i want to replace the number between the tags. And i want the file to... (6 Replies)
Discussion started by: Demoric
6 Replies
9. Shell Programming and Scripting
Hi experts a have a very large file and I need to add two columns: the first one numbering the incidence of records and the another with the total count
The input file:
21 2341 A
21 2341 A
21 2341 A
21 2341 C
21 2341 C
21 2341 C
21 2341 C
21 4567 A
21 4567 A
21 4567 C
... (6 Replies)
Discussion started by: juelillo
6 Replies
10. UNIX for Dummies Questions & Answers
Hello People,
I have the following contents in an XML file
...........
...........
..........
...........
<Details = "Sample Details">
<Name>Bob</Name>
<Age>34</Age>
<Address>CA</Address>
<ContactNumber>1234</ContactNumber>
</Details>
...........
.............
.............. (4 Replies)
Discussion started by: sushant172
4 Replies