10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Experts,
I have csv file with 30, 40 columns
Pasting just 2 column for problem description.
Need to print error if below combination is not present in file
check for column-1 (DocumentNumber) and filter columns where value in DocumentNumber field is same.
For all such rows, the field... (7 Replies)
Discussion started by: as7951
7 Replies
2. Shell Programming and Scripting
cat input.txt
a x
b y
c z
Expected output
x
y
z (11 Replies)
Discussion started by: cola
11 Replies
3. Shell Programming and Scripting
Good day all.
Using basic UNIX/Linux tools, how would you delete a line based on a character found in column 1?
For example, if the CITY name contains an 'a' or 'A', delete the line:
New York City; New York
Los Angeles; California
Chicago; Illinois
Houston; Texas
Philadelphia;... (3 Replies)
Discussion started by: BRH
3 Replies
4. Shell Programming and Scripting
Hi,
I am a newbie to shell scripting (.sh). Please guide me on how to do the below issue.
My input file has below data.
I want to remove $ sysmbol from the fourth column of each line. (ie, between 4th and 5th pipe symbol)
ABC25160|51497|06/02/2010|$32,192.07|MARK|$100|A... (3 Replies)
Discussion started by: rsreejithmenon
3 Replies
5. Shell Programming and Scripting
Input File
science maths
tom 2 3
peter 5
rodger 5 7
Desired Ouput
science maths
tom 2 3
rodger 5 7
Here Peter does not have any value for column Science, how can we delete Peter's row.
assuming this is abc.txt file; and am using bash... (8 Replies)
Discussion started by: vishalgoyal
8 Replies
6. Shell Programming and Scripting
Hi All,
i have a csv file .
In the 7th column i have data that has line feed in it.
Requirement is to remove the line feed from the 7th column whenever it appears
There are 11 columns in the file
C1,C2,C3,C4,C5,C6,C7,C8,C9,C10,C11
The value in C7 contains line feed ( Alt + Enter ),... (2 Replies)
Discussion started by: r_t_1601
2 Replies
7. Shell Programming and Scripting
Hi All,
My requirement is to remove line (3 Replies)
Discussion started by: r_t_1601
3 Replies
8. Shell Programming and Scripting
Hello,
I've never used awk before, but from what I've read, it will best suit what I'm trying to do. I have 2 files. I need to replace strings in file1 with the first column of a matching string in file2. Below are examples:
File1:
random-string1
1112
1232
3213
2131
random-string2... (7 Replies)
Discussion started by: upstate_boy
7 Replies
9. Shell Programming and Scripting
Folks:
I have a file which has 3 columns. Using awk I want to remove rows from column 3 (Col3 <> A) where it is not equal to A. All columns are seperated by "|".
Col1|Col2|Col3|Col4
1 | 2 | A | 4
2 | 3 | A | 5
3 | 4 | B | 6
4 | 5 | A | 7
5 | 6 | ... (3 Replies)
Discussion started by: pr2003
3 Replies
10. Shell Programming and Scripting
Dear friends,
I have a pipe delimited file having 5 columns.
However the column no-3 is having extra new line characters as the data owing to owing , I am having issues.
Ideally my file should have only newline termination at the end of each record and not within column data of any of... (1 Reply)
Discussion started by: sureshg_sampat
1 Replies