06-20-2013
If your source file is a spreadsheet file, then note that it is a binary file format.
You cannot use shell scripts to work on such files. There are perl modules that allow you to work with spreadsheet file. Search
CPAN for details.
But if it is a CSV file, it can be done using shell script. If yes, post a representative sample input and desired output in
code tags
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
Can anyone help me with the task below?
Example:
The contents in fileA.txt are:
HELLO
HOW DO U DO?
The contents in fileA.txt are:
HI
I AM FINE.
how to combine the data in 2 files into one with the format below?
Case A-fileA.txt
HELLO
HOW DO U DO?
Case B-fileB.txt (4 Replies)
Discussion started by: c0384
4 Replies
2. Shell Programming and Scripting
The awk is giving below output:
SELECT
divrel.child_org_idn org_main_idn
NULL ( VARCHAR(200)) div_nam_2
NULL ( VARCHAR(200)) div_nam_3
NULL ( VARCHAR(200)) div_nam_4
NULL ( VARCHAR(200)) div_nam_5
NULL ( VARCHAR(200)) div_nam_6
NULL ( VARCHAR(200)) div_nam_7
... (2 Replies)
Discussion started by: goutam_igate
2 Replies
3. Shell Programming and Scripting
My input file:
data_5 Ali 422 2.00E-45 102/253 140/253 24
data_3 Abu 202 60.00E-45 12/23 140/23 28
data_1 Ahmad 256 7.00E-45 120/235 140/235 22
data_4 Aman 365 8.00E-45 15/65 140/65 20
data_10 Jones 869 9.00E-45 65/253 140/253 18... (12 Replies)
Discussion started by: patrick87
12 Replies
4. Shell Programming and Scripting
My input:
Data name: ABC001
Data length: 1000
Detail info
Data Direction Start_time End_time Length
1 forward 10 100 90
1 forward 15 200 185
2 reverse 50 500 450
Data name: XFG110
Data length: 100
Detail info
Data Direction Start_time End_time Length
1 forward 50 100 50 ... (11 Replies)
Discussion started by: patrick87
11 Replies
5. UNIX for Dummies Questions & Answers
In open office spreadsheet, i would like to fill a cell with the name of the spread sheet.
That is if the file name of spread sheet is, team.ods, then i have to fill a specific cell with that name 'team'. How to do that ?
I have more spread sheets to be created, so i want it to be done... (0 Replies)
Discussion started by: thegeek
0 Replies
6. Shell Programming and Scripting
How do I extract the last cell in a column of a csv file using linux shell scripting?
Or alternatively, how do I get the number of cells of a csv file? (2 Replies)
Discussion started by: locoroco
2 Replies
7. UNIX for Dummies Questions & Answers
:confused:Hello -- i just joined the forums. I am a complete noob -- only about 1 week into learning how to program anything... and starting with linux.
I am working in Linux terminal.
I have a folder with a bunch of txt files. Each file has several lines of html code. I want to combine... (2 Replies)
Discussion started by: jetsetter
2 Replies
8. Shell Programming and Scripting
Hello All,
I have the following code in PERL to write data to excel sheet.
Can someone please help me about how to append data to an exisitng cell?
For ex in the below given case,Cell 1,1 has Active State PERL
Now I want to add a new line like "prorgamming" without overwritting the... (3 Replies)
Discussion started by: prasperl
3 Replies
9. Solaris
good evening,
hi, I have problem for copy file, size more > 1 TB, just only for single file.
error said, capacity not enough, even my storage I set to 4 TB, file always reject during finish copy.
but, if I copy with multiple file/separate file, total calculation file is 2 TB, always success.... (10 Replies)
Discussion started by: katumping
10 Replies
10. UNIX for Beginners Questions & Answers
My CSV file looks similar to this example (the K, L, and M are in the same cell as J but each on a new line within that cell):
1, A, B, C, D
2, E, F, G, H
3, I, J N, O,
K
L
M,
4, P, Q, R, S
I would like to have it look like this:
1, A,... (6 Replies)
Discussion started by: Kim Ashby
6 Replies
PSC(1) General Commands Manual PSC(1)
NAME
psc - prepare sc files
SYNOPSIS
psc [-fLkrSPv] [-s cell] [-R n] [-C n] [-n n] [-d c]
DESCRIPTION
Psc is used to prepare data for input to the spreadsheet calculator sc(1). It accepts normal ascii data on standard input. Standard out-
put is a sc file. With no options, psc starts the spreadsheet in cell A0. Strings are right justified. All data on a line is entered on
the same row; new input lines cause the output row number to increment by one. The default delimiters are tab and space. The column for-
mats are set to one larger than the number of columns required to hold the largest value in the column.
OPTIONS
-f Omit column width calculations. This option is for preparing data to be merged with an existing spreadsheet. If the option is not
specified, the column widths calculated for the data read by psc will override those already set in the existing spreadsheet.
-L Left justify strings.
-k Keep all delimiters. This option causes the output cell to change on each new delimiter encountered in the input stream. The
default action is to condense multiple delimiters to one, so that the cell only changes once per input data item.
-r Output the data by row first then column. For input consisting of a single column, this option will result in output of one row
with multiple columns instead of a single column spreadsheet.
-s cell
Start the top left corner of the spreadsheet in cell. For example, -s B33 will arrange the output data so that the spreadsheet
starts in column B, row 33.
-R n Increment by n on each new output row.
-C n Increment by n on each new output column.
-n n Output n rows before advancing to the next column. This option is used when the input is arranged in a single column and the
spreadsheet is to have multiple columns, each of which is to be length n.
-d c Use the single character c as the delimiter between input fields.
-P Plain numbers only. A field is a number only when there is no imbedded [-+eE].
-S All numbers are strings.
-v Print the version of psc
SEE ALSO
sc(1)
AUTHOR
Robert Bond
PSC 7.16 19 September 2002 PSC(1)