10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Gents
Is it possible to update the code to get the desired output files from the input list. I called variable to the first column.
I need to consider the first column as key to grep the values in the second column according to the desired request.
input list
(attached )
output1
... (12 Replies)
Discussion started by: jiam912
12 Replies
2. Shell Programming and Scripting
cat /tmp/i.txt
'(ORA-28001|ORA-00100|ORA-28001|ORA-20026|ORA-20025|ORA-02291|ORA-01458|ORA-01017|ORA-1017|ORA-28000|ORA-06512|ORA-06512|Domestic Phone|ENCRYPTION)'
grep -ia 'ORA-\{5\}:' Rep* |grep -iavE `cat /tmp/i.txt`
grep: Unmatched ( or \(
Please tell me why am i getting that (6 Replies)
Discussion started by: jhonnyrip
6 Replies
3. UNIX for Beginners Questions & Answers
I have a file with two columns separated by white space.
Dog Cat
fido sneaky
dopey poptart
ears whisker
barky herd
Trying to list the words under the column named Dog. Tried a few variations of awk but can't... (4 Replies)
Discussion started by: jimmyf
4 Replies
4. SCO
In COBOL, a hyphen can be used in a field name and in a specific program some field names would be identical to others except a suffix was added--sometimes a suffix to a suffix was used. For example, assume I am looking for AAA, AAA-BBB, and AAA-BBB-CCC and don't want to look at AAA-BBB-CCC... (7 Replies)
Discussion started by: wbport
7 Replies
5. Shell Programming and Scripting
Hi,
I want to read a file line by line and exclude the lines that are beginning with special characters. The below code is working fine except when the line starts with hyphen (-) in the file.
for TEST in `cat $FILE | grep -E -v '#|/+' | awk '{FS=":"}NF > 0{print $1}'`
do
.
.
done
How... (4 Replies)
Discussion started by: Srinraj Rao
4 Replies
6. Shell Programming and Scripting
Hi,
So I was trying this awk snippet
awk -F, '$1 ~ /Match/' File
This is my sample file output
Name,Age,Nationality,Description
Jack,20,American,Tall, caucasian, lean
Mary,30,British,Short,white,slim
I would expect expected Output to be, when a certain match is met say $1 is... (2 Replies)
Discussion started by: sidnow
2 Replies
7. Shell Programming and Scripting
Hi have a large spreadsheet which has 4 columns
APM00111803814 server_2 96085 Corp IT Desktop and Apps
APM00111803814 server_2 96085 Corp IT Desktop and Apps
APM00111803814 server_2 96034 Storage Mgmt Team
APM00111803814 server_2 96152 GWP... (6 Replies)
Discussion started by: kieranfoley
6 Replies
8. Shell Programming and Scripting
Hi,
I've got a regex match to perform in a Bash script and can't quite get it right.
Basically I want to match all IP address like sequences in a file which may or may not contain an IP address but with the extra qualification of ignoring any IP-like sequence which begins and ends with a... (27 Replies)
Discussion started by: gencon
27 Replies
9. Shell Programming and Scripting
Hello experts,
Shown below is the 2 column sample data(there are many data columns in actual input file),
Key, Data
A, 1
A, 2
A, 2
A, 3
A, 1
A, 1
A, 1
I need the below output.
Key, Data
A, 2
A, 2
A, 3
A, 1
A, 1
A, 1 (2 Replies)
Discussion started by: ks_reddy
2 Replies
10. Shell Programming and Scripting
Hi,
I have a pipe delimited file. I am checking for junk characters ( non printable characters and unicode values).
I am using the following code
grep '' file.txt
But i want to ignore the name fields. For example field2 is firstname so i want to ignore if the junk characters occur... (4 Replies)
Discussion started by: ashwin3086
4 Replies