10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I thought I had this figured out but was wrong so am humbly asking for help.
The task is to add an additional column to FILE 1 based on records in FILE 2.
The key is in COLUMN 1 for FILE 1 and in COLUMN 1 OR COLUMN 2 for FILE 2.
I want to add the third column from FILE 2 to the beginning of... (8 Replies)
Discussion started by: andmal
8 Replies
2. Shell Programming and Scripting
Hello,
I have 40 data files where the first three columns are the same (in theory) and the 4th column is different. Here is an example of three files,
file 2: A_f0_r179_pred.txt
Id Group Name E0
1 V N(,)'1 0.2904
2 V N(,)'2 0.3180
3 V N(,)'3 0.3277
4 V N(,)'4 0.3675
5 V N(,)'5 0.3456
... (8 Replies)
Discussion started by: LMHmedchem
8 Replies
3. Shell Programming and Scripting
Hi all ,
I have a file having 12 columns tab delimited .
I need to read this file and remove the column 3 and column 4 and insert a word in column 3 as "AVIALABLE "
Is there a way to do this . I am trying like below
Thanks
DJ
cat $FILENAME|awk -F"\t" '{ print $1 "\t... (3 Replies)
Discussion started by: Hypesslearner
3 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have a tab delimited document with 18 columns. My file looks like:
comp1000201_c0_seq1 comp1000201_c0 337 183.51 0.00 0.00 0.00 0.00 ---NA--- 337 0 0
-
comp1000297_c0_seq1 comp1000297_c0 612 458.50 ... (1 Reply)
Discussion started by: alisrpp
1 Replies
5. Shell Programming and Scripting
Dear All,
I would like to find an automatic way to add a given code which belong to a class at the end of the column , for example this is my input file:
0610009O20Rik
V$VMYB_01 310 (+) 1 0.971 v-Myb
V$EVI1_04 782 (-) 0.763 0.834 Evi-1
V$ELK1_02 1966 (-) 1 0.984 Elk-1... (4 Replies)
Discussion started by: paolo.kunder
4 Replies
6. UNIX for Dummies Questions & Answers
Hello gurus,
I have a file in a tab delimited format and a header row. I need a code to delete the header in the file, and convert the file to a fixed width format, with all the columns aligned. Below is a sample of the file:... (4 Replies)
Discussion started by: chumsky
4 Replies
7. UNIX for Dummies Questions & Answers
Hello,
I have about 100 files in a directory with fields which are tab delimited. I would like to append the file name as the first field and it has to be done as many times as the total lines in the file.
For example,
myFile1.txt has the following data:
1 x y z
2 a b ... (5 Replies)
Discussion started by: Gussifinknottle
5 Replies
8. Shell Programming and Scripting
Hello,
Can someone help me to do this with awk or sed? I have a file with multiple lines, each line has many fields separated with a tab. I would like to add one more field holding 'na' in between the first and second fields.
old file looks like,
1, field1 field2 field3 ...
2, field1... (7 Replies)
Discussion started by: ssshen
7 Replies
9. Shell Programming and Scripting
I have a tab-Delimited file:
Eg:
'test' file contains:
a<tab>b<tab>c<tab>....
Based on certain condition, I wanna increase the number of lines of this file.How do I do that
Eg:
If some value in the database is 1 then one line in 'test' file is fine..
If some value in the database is 2... (1 Reply)
Discussion started by: shiroh_1982
1 Replies
10. Shell Programming and Scripting
Hey guys...
Running Solaris 5.6, trying to write an easy /sbin/sh script. I want to run several commands, then have the results appear on one line. Additionally, I want the results to be separated by <TAB>.
Let's say that my script calls three commands (date, pwd, and hostname), I would want... (2 Replies)
Discussion started by: cdunavent
2 Replies