10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Dear all,
I have a file call test.txt which has 2000 columns, 1000 rows. If I want to trim all the columns to 3 decimal places, how can I do it? I know how to use awk prinf to trim specic columns. But I don't know how to trim all the columns. Thank you.
data sample:
0.976004565 9.34567845... (6 Replies)
Discussion started by: forevertl
6 Replies
2. Shell Programming and Scripting
Hi all, I'm pretty much a newbie to UNIX. I would appreciate any help with UNIX coding on comparing two large csv files (greater than 10 GB in size), and output a file with matching columns.
I want to compare file1 and file2 by 'id' and 'chain' columns, then extract exact matching rows'... (5 Replies)
Discussion started by: bkane3
5 Replies
3. Shell Programming and Scripting
I have a document that has 7 columns.
eg.
$1 $2 $3 $4 $5 $6 $7
string string string string integer integer integer
The 6th and 7th columns are a mix of integers and floating decimals (with 4 decimal places). I need to convert the last 2 columns so that all values are floating decimals w/4... (1 Reply)
Discussion started by: kadm
1 Replies
4. UNIX for Dummies Questions & Answers
---------- Post updated at 01:58 PM ---------- Previous update was at 01:48 PM ----------
For some reason my question is not getting printed. Here are the details:
Greetings.
I would like to add/subtact an integer to/from two columns of integers. I feel like this should be easy using awk... (3 Replies)
Discussion started by: Twinklefingers
3 Replies
5. Shell Programming and Scripting
Hi Friends,
I have come across some files where some of the columns don not have data.
Key, Data1,Data2,Data3,Data4,Data5
A,5,6,,10,,
A,3,4,,3,,
B,1,,4,5,,
B,2,,3,4,,
If we see the above data on Data5 column do not have any row got filled. So remove only that column(Here Data5) and... (4 Replies)
Discussion started by: ks_reddy
4 Replies
6. Shell Programming and Scripting
Hello everyone,
I searched the forum looking for answers to this but I could not pinpoint exactly what I need as I keep having trouble.
I have many files each having two columns and hundreds of rows.
first column is a string (can have many words) and the second column is a number.The files are... (5 Replies)
Discussion started by: isildur1234
5 Replies
7. Shell Programming and Scripting
Hi all,
I have created a script which adding two columns and removing two columns for all files.
Filename: Cust_information_1200_201010.txt
Source Data:
"1","Cust information","123","106001","street","1-203 high street"
"1","Cust information","124","105001","street","1-203 high street"
... (0 Replies)
Discussion started by: onesuri
0 Replies
8. Shell Programming and Scripting
Hi I need a bash shell script that will take text files with 4 rows and different numbers of columns in each row and convert each one into a text file with just one column.
I then subtract 1.5 from each number in the column (I have that part already)
The next step after that is I want to have... (10 Replies)
Discussion started by: ac130pilot
10 Replies
9. UNIX for Dummies Questions & Answers
Hello,
I might require some help here.
I have a file, ITEMS with the below data :
A1 20 A2 A3
B1 40 B2 B3
C1 70 C2 C3
D1 90 D2 D3
I need the output as :
A2 A3 20
B2 B3 40
C2 C3 70
D2 D3 90
i.e, I need the sequence of columns to be changed and only 3 fields to be... (5 Replies)
Discussion started by: sushant172
5 Replies
10. UNIX for Dummies Questions & Answers
I have the following script:
(echo -n `curl http://www.example.com/scores.txt | grep mylocation`; date +%Y%m%d%H%M%S) >> myscores.txt
This script works fine, except that it places the timestamp at the end of the file myscores.txt. How do add the timestamp as the first column and then a tab and... (4 Replies)
Discussion started by: figaro
4 Replies