10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
There is a file with a data. If the line is longer than 'n', we splitting the line on the parts and print them. Each of the parts is less than or equal 'n'.
For example:
n = 2;
"ABCDEFGHIJK" -> length 11
Results:
"AB" "CD" EF" GH" "IJ" "K"
Code, but there are some errors.... (9 Replies)
Discussion started by: booyaka
9 Replies
2. Shell Programming and Scripting
Hi! all
can any one tell me how to compare current record of column with next and previous record in awk without using array
my case is like this
input.txt
0 32
1 26
2 27
3 34
4 26
5 25
6 24
9 23
0 32
1 28
2 15
3 26
4 24 (7 Replies)
Discussion started by: Dona Clara
7 Replies
3. Shell Programming and Scripting
I have file with below content
FG1620000|20000
FG1623000|23000
FG1625000|25000
FG1643894|43894
FG1643895|43895
FG1643896|43896
FG1643897|43897
FG1643898|43898
My aim is to split the above file into two files based on the value in the second field.
If the value in second field is... (2 Replies)
Discussion started by: anijan
2 Replies
4. Shell Programming and Scripting
Hello,
For the input file, I am trying to split those records which have multiple values seperated by '|' in the last input field, into multiple records and each record corresponds to the common input fields + one of the value from the last field.
I was trying with an example on this forum... (4 Replies)
Discussion started by: imtiaz99
4 Replies
5. Shell Programming and Scripting
I was given a data file that I need to split into multiple lines/records based on a key word. The problem is that it is 2.5GB or bigger and everything I try in perl or sed causes a Segmentation fault. Can someone give me some other ideas.
The data is of the form:... (5 Replies)
Discussion started by: leolson
5 Replies
6. UNIX for Dummies Questions & Answers
can any1 explain me hw is below wrking:
wat is substr and dd,mmyear used for
wat values will go in dese?
sdt='31122010235959'
sdate=`validate_date $sdt`
validate_date()
{
dt="$1"
set `echo $dt | nawk '{ print... (2 Replies)
Discussion started by: musu
2 Replies
7. Shell Programming and Scripting
Input:
Debris Linux is a minimalist, desktop-oriented distribution and live CD based on Ubuntu.
It includes the GNOME desktop and a small set of popular desktop applications, such
as GNOME Office, Firefox web browser, Pidgin instant messenger, and ufw firewall manager.
Debris Linux ships... (5 Replies)
Discussion started by: cola
5 Replies
8. Shell Programming and Scripting
Hi,
I have one file with the following details,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Account_Id Date Id Balance
44 9 1000.00 30 15-10-2173 10 1000.00 42 15-10-2173 10 1200.00 53 01-01-2008 10 1200.00
I need to split up the values in to the respective fields as follows,
... (7 Replies)
Discussion started by: Kattoor
7 Replies
9. UNIX for Dummies Questions & Answers
All,
We receive a file with a large no of records (records can vary) and we have to split it into two files based on another file. e.g.
File1:
UHDR 2008112
"25187","00000022","00",21-APR-1991,"" ,"D",-000000519,+0000000000,"C", ,+000000000,+000000000,000000000,"2","" ,21-APR-1991... (7 Replies)
Discussion started by: er_ashu
7 Replies
10. 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