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 All ,
I am getting record too long for the below command .
nawk -F\" '{a=a" "$2} END{for(i in a) print i,a }' test|sort|awk '{for(i=1;i<=NF;i++) t=t"\t"$i;if(NF>max)max=NF} END{for(i=1;i<=max;i++)print t }'
File test has 850 records ...
Please help.. (2 Replies)
Discussion started by: saj
2 Replies
3. Shell Programming and Scripting
I have written below script to add substring in a file containing fixed length record, but when I run below script I get error as:
ERROR:
awk: record `22503004502488344040...' too long
My fixed length record has length around 2000, each file is having 5000 records and total number of files is... (3 Replies)
Discussion started by: Devesh5683
3 Replies
4. Shell Programming and Scripting
Hi Everyone,
I have a txt file with 40k lines.
111 1.1.1.1
111 1.1.1.1
111 2.2.2.2
111 1.1.1.1
111 1.1.1.1
How would use perl to easy have IP list, the final result will be:
1.1.1.1,2.2.2.2,
I can only think using if to determine one by one through all 40k, this is working, but... (10 Replies)
Discussion started by: jimmy_y
10 Replies
5. Shell Programming and Scripting
Hi
I receive a mainframe file which has very long records (1100 chars) with no field delimiters. I need to parse each record and output a comma delimited (csv) file. The record layout is fixed. If there weren't so many fields and records I would read the file into Excel, as a "fixed width"... (10 Replies)
Discussion started by: wvdeijk
10 Replies
6. UNIX for Dummies Questions & Answers
Hi guys,
i have a big file with the following format.This includes header(H),detail(D) and trailer(T) information in the file.My problem is i have to search for the character "6h" at 14 th and 15 th position in all the records .if it is there i have to write all those records into a... (1 Reply)
Discussion started by: raoscb
1 Replies
7. UNIX for Advanced & Expert Users
I need to write a script that can find a bad record (for example: there is date field colom but value provided in the file for this field is N/A) then script shoud searches this pattern and then insert the whole record into the bad file.
Example:
File1
Name designation dateOfJoining... (1 Reply)
Discussion started by: shilendrajadon
1 Replies
8. Shell Programming and Scripting
Hi,
I am new to UNIX scripting and woiuld appreicate your help...
Input file contains only one (but long) record:
aaaaabbbbbcccccddddd.....
Desired file:
NEW RECORD #new record (hardcoded) added as first record - its length is irrelevant#
aaaaa
bbbbb
ccccc
ddddd
...
...
... (1 Reply)
Discussion started by: rsolap
1 Replies
9. Shell Programming and Scripting
Hi All,
I have a txt file which is an export of a query result from the database. The txt file contains 'Processid#sqlquery' from the database table.As the sqlquery is too long.... i am unable to get the fields seperated using the awk script as below:-
cat sql.txt | awk -F'#' '{printf $2}'... (2 Replies)
Discussion started by: venkatajay_18
2 Replies
10. UNIX for Dummies Questions & Answers
I am trying to generate a small report with the help of awk.
The contents are present in a file whose last line is very long.
I can't shorten this line as its generated after a lot of processing.
On reading this file awk says
record "starting of line ..." too long
record number 30
Now... (2 Replies)
Discussion started by: vibhor_agarwali
2 Replies