10 More Discussions You Might Find Interesting
1. 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
2. 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
3. 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
4. Shell Programming and Scripting
Hi,
I have a situation where I want to ignore few users from list of users and print rest of user in log file.
say, I want to ignore aaa, bbb, ccc, ddd .. ppp from list of 20 user (do not want to include)
What is the good command or any script?
Thanks in advance. (1 Reply)
Discussion started by: sumit30
1 Replies
5. Shell Programming and Scripting
Hi,
I need to perform a grep from a file, but ignore any results from the first column.
For simplicity I have changed the actual data, but for arguments sake, I have a file that reads:
MONACO Monaco ASMonaco
MANUTD ManUtd ManchesterUnited
NEWCAS NewcastleUnited
NAC000 NAC ... (5 Replies)
Discussion started by: danhodges99
5 Replies
6. 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
7. Shell Programming and Scripting
hi all,
for an example:
In a file out.txt contains:
/export/home/raghu/bin/debug_serverLog_apache_20090626_0625.txt
How to grep or cut the value as "debug_serverLog_apache_20090626_0625.txt"
or i want only the output as "debug_serverLog_apache_20090626_0625.txt"
pls advice me (3 Replies)
Discussion started by: raghur77
3 Replies
8. Shell Programming and Scripting
find . -exec grep "something" {} \;
this command only show the grep data but doesn't show the file name and path, how to show file path in this command? (4 Replies)
Discussion started by: bill.zheng
4 Replies
9. Shell Programming and Scripting
Hi,
In the following part of a script, I am grepping the list of all
running PIDs in the File as in line 3 :-
$pid_count=`grep -c "^${pid_process}$" $CRI_PUSH_BIN_HOME/bin/
PushProcessId`
If I cannot grep this way, then how can I do so.
1 pid_process=`ps -ef -o pid,args |... (1 Reply)
Discussion started by: marconi
1 Replies
10. UNIX for Dummies Questions & Answers
How will you list only the empty lines in a file (using grep) (1 Reply)
Discussion started by: JosephGerard
1 Replies