10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I'm struggling with a problem at the minute. Basically, I have a file with >1000 columns / fields (with headers), each containing a variable number of values. I would like to stack each column such that all the data appears in a single column, e.g. the first value of column 2 is moved to... (5 Replies)
Discussion started by: TAlcock
2. Shell Programming and Scripting
I have problem to append new data at the end of each line of the files where it takes whole value of the nth column. My expected result i just want to take a specific value only. This new data is based on substring of 11th, 12th 13th column that has comma seperated value.
awk... (4 Replies)
Discussion started by: null7
3. Shell Programming and Scripting
I have a fileA with one column (1000 rows), and fileB with 26 columns(13000 rows).
I need to search each value of fileA with fileB and return all the 26 values from FileB to a new file- File C if matches. The search value (from FileA) may present in any of the 26 values in FileB. This value is not... (7 Replies)
Discussion started by: vamsikrishna928
4. Shell Programming and Scripting
I am new to using awk and am quickly discovering what a powerful pattern-recognition tool it is. However, I have what seems like a fairly basic task that I just can't figure out how to perform in one line. I want awk to find and print all the lines in which one of multiple patterns (e.g.... (8 Replies)
Discussion started by: elgo4
5. Shell Programming and Scripting
I am looking for an awk script to do the following
Join the fields together only if the first 4 fields are same.
Can it be done with join function in awk??
... (1 Reply)
Discussion started by: aksijain
6. UNIX for Dummies Questions & Answers
I have 2 files as below
Chr Start End
chr1 120 130
chr1 140 150
chr2 130 140
Chr Start End Value
chr1 121 128 ABC
chr1 144 149 XYZ
chr2 120 129 PQR
I would like to compare these files using awk; specifically if column 1 of file1 is equal to column 1 of file2... (7 Replies)
Discussion started by: sshetty
7. Shell Programming and Scripting
I am new to Shell Scripting and need your help in the below situation.
- I have two files (File 1 and File 2) and the contents of the files are mentioned below.
- "Application handle" is the common field in both the files.
(NOTE :- PLEASE REFER TO THE ATTACHMENT "Compare files... (2 Replies)
Discussion started by: Santoshbn
8. Shell Programming and Scripting
I have a file with two fields. The first field repeats itself for quite a while but the second field changes. What I want to do is to go through the first column until its value changes (and while it doesn't, verify that the second field is in a sequence from 0-15).
... (13 Replies)
Discussion started by: acsg
9. Shell Programming and Scripting
I have two files
I need two output file as follows
If field3 in file1 is same as field3 in the next line then the field4 should add... (1 Reply)
Discussion started by: yerruhari
10. Shell Programming and Scripting
Currently I am coding up a nasty way of reading file input using *cat* rather than *read*. My text input looks like
Currently I am using cat |while read line to read the first column and second column fields.
cat foo.txt|while read line
... (1 Reply)
Discussion started by: ahjiefreak