10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hello,
I am very now to this, hope you can help,
I am looking into editing a file in Solaris, with dinamic collums (lenght varies) and I need 2 things to be made, the fist is to filter the first column and third column from the file bellow file.txt, and create a new file with the 2 filtered... (8 Replies)
Discussion started by: jpbastos
8 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I would like to add a new column containing the row numbers to a text file. How do I go about doing that? Thanks!
Example input:
A X
B Y
C D
Output:
A X 1
B Y 2
C D 3 (5 Replies)
Discussion started by: evelibertine
5 Replies
3. Red Hat
Suppose I have a file containing :-
1 Apple $50
2 Orange $30
3 Banana $10
4 Guava $25
5 Pine@apple $12
6 Strawberry $21
7 Grapes $12
In the 5th row, @ character inserted. I want through sort command or by any other way this row should either on top or bottom.
By sort command garbage... (1 Reply)
Discussion started by: Dipankar Mitra
1 Replies
4. UNIX for Dummies Questions & Answers
Hi,
I have a tab delimited text file with three different columns. I want to add an extra column to the text file. The extra column will be the second column and it will equal third column - 1. How do I go about doing that? Thanks!
Input:
chr1 788822 rs11240777
chr1 1008567 rs9442372... (2 Replies)
Discussion started by: evelibertine
2 Replies
5. Shell Programming and Scripting
Hi,
I am trying to get the file in particular pattern using shell script. I have to add one column to some other file.
For example consider two file as below.
File1:
name1
name2
name3
File2:
Add1 age1
Add2 age2
Add3 age3
I want this two file in a single file format something like... (3 Replies)
Discussion started by: diehard
3 Replies
6. UNIX for Dummies Questions & Answers
I have a space delimited text file with two columns. I would like to add NA to the first column of the text file.
Input:
19625 10.4791768259
19700 10.8146489183
19701 10.9084026759
19702 10.9861346978
19703 10.9304364984
Output:
NA19625 10.4791768259
NA19700 10.8146489183... (1 Reply)
Discussion started by: evelibertine
1 Replies
7. Shell Programming and Scripting
Hi All
I am trying to combine columns from multiple text files into a single file using paste command but the record length being unequal in the different files the data is running over to the closest empty cell on the left. Please see below.
What can i do to resolve this ?
File 1 File... (15 Replies)
Discussion started by: venky_ibm
15 Replies
8. Shell Programming and Scripting
Dear all,
Does anyone know how I could to add a column of numbers (1s, or 2s, or..., or 6s) to two-column text files (tab-delimited), where the specific number to be added varies as a function of the file naming?
Currently, each of my text files has two columns, so the column with the... (12 Replies)
Discussion started by: rlapate
12 Replies
9. UNIX for Advanced & Expert Users
Hi All,
I have two txt files like this
File1:
no name
----------
12 aaaa
23 bbbb
55 cccc
File2
dname dno
------------
civil 33
mech 55
arch 66
Now i want to compare col1 from File and col2 from File2, if its match i want fetch all columns from... (3 Replies)
Discussion started by: psiva_arul
3 Replies
10. Shell Programming and Scripting
hi
i have file which hav following entries
1501,AAA,2.00
1525,AAA,2.00
1501,AAA,2.00
1525,AAA,2.00
1501,AAA,3.00
1525,AAA,3.00
1525,AAA,3.00
1501,AAA,3.00
1501,AAA,3.00
i want to have a o/p coloum wise
like
1501,AAA,13
1525,AAA,10
here 13 comes as a sum of last colum value... (6 Replies)
Discussion started by: aaysa123
6 Replies