I'm using this to access a website using cURL to download each company's turnover. After I sanitize the output from cURL i get a list like this. Comments are for illustration only here, not in actual output.
In my script I append the company name from the original input file as i don't want to get that from the web each time. Currently I add this to the top of each batch of 6 lines so the output looks like
Now, I need to have all this in 4 columns like this
Your example gave an output like this
Thanks for your help! The problem was that the output had DOS newlines and I had to take care of the trailing and leading spaces. So the paste didn't work. Once converted it works like a charm. The full, ugly script now looks like
If the two -- characters between the sets are actually part of the data, either remove them first, or add another read statement before the done statement.
I didn't see all the solutions on page 2 until I finished my post. -
Split column data if the table has n number of column's with some record then how to split n number of colmn's line by line with records
Table
---------
Col1 col2 col3 col4 ....................col20
1 2 3 4 .................... 20
a b c d .................... v
... (11 Replies)
please write a shell script
Table
--------------------------
1 2 3 a b c
3 4 5 c d e
7 8 9 f g h
Output should be like this
---------------
1 2 3
3 4 5
7 8 9
a b c
c d e
f g h (1 Reply)
Hi all, looking for some help here. I'm what you'd call a dirty programmer. my shell scripts might be ugly, but they (usually) function...
Say I have a single column text file with a list of dates (yyyymmdd) that represent the elevation of a point on that date (I work with land subsidence, so... (2 Replies)
This is my input file :
# cat list 20130430121600, cucm, location,76,2 20130430121600,cucm1,location1,76,4 20130430122000,cucm,location,80,8 20130430122000,cucm1,location1,90,8 20130430140000,cucm1,location1,87,11 20130430140000, cucm,location,67,9
This is the required output
... (1 Reply)
Hi,
I have an ascii file containing information. This file is n x m lines.
Is there a way to generate an ascii file where the information is stored as n x m table instead? The m columns should be tab separated.
Thanks a lot,
Sarah (11 Replies)
Match column 3 in file1 to column 1 in file 2 and replace with column 2 from file2
file 1 sample
SNDK 80004C101 AT
XLNX 983919101 BB
NETL 64118B100 BS
AMD 007903107 CC
KLAC 482480100 DC
TER 880770102 KATS
ATHR 04743P108 KATS... (7 Replies)
Hi All,
in bash I have a text file which is something like
7.96634E-07 1.0000 0.00000E+00 0.0000 0.00000E+00 0.0000 1.59327E-06 0.7071
2.23058E-05 0.1890 6.61207E-05 0.1098 1.13919E-04 0.0865 1.47377E-04 0.0747
....
....
0.00000E+00 0.0000 0.00000E+00 0.0000 ... (6 Replies)
Hi, Iam new to unix. I have one input file .
Input file :
ID1~Name1~Place1
ID2~Name2~Place2
ID3~Name3~Place3
I need output such that only first column should change to fixed width column of 15 characters of length.
Output File:
ID1<<12 spaces>>Name1~Place1
ID2<<12... (5 Replies)
Hi
I am ETL person.
I have a table in Oracle having one of its column defined as BLOB
where it can hold huge data.
When i generate a file in DataStage and place it in a path.
and i would like dump the file in to the column of the table having datatype as BLOB. (0 Replies)