8 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
So, I have the following code:
cat testfile.txt | awk -F, '{ print $1" "$2" "$3" "$4" "$5 }' | read DOC ORG NAME
echo "$DOC"
echo "$ORG"
echo "$NAME"
My testfile.txt looks something like the following:
Document Type,Project Number,Org ID,Invoice Number
It will eventually be more... (14 Replies)
Discussion started by: Parrakarry
14 Replies
2. Shell Programming and Scripting
Hello Experts..
I have 3-4 C codes with Oracle SQL statements embedded. All the SQL statements starts with EXEC SQL keyword and ends with ;. I want to extract all the SQL statements out of these codes.
I did awk '/^EXEC SQL/,/\;/' inputFile (I use this on all of the codes individually). That... (2 Replies)
Discussion started by: juzz4fun
2 Replies
3. Shell Programming and Scripting
Hi Guru's.
I am trying to use to check if $5 is greater than 80 & if not 100, then to print $0 :
awk '{ if ($5>80) && if ($5 != 100) print $0}
But getting error:
>bdf1|sed 's/%//g'|awk '{ if ($5>80) && if ($5 != 100) print $0}'
syntax error The source line is 1.
The error... (6 Replies)
Discussion started by: rveri
6 Replies
4. UNIX for Dummies Questions & Answers
I have a file called mytitles.txt containing a list of book titles
I have a second file called abfile.txt containing a list of book titles (in the 3rd field) and it has author info and copyright year info as well..
I want to search mytitles.txt for a match in the 3rd field of abfiles.txt, and... (2 Replies)
Discussion started by: glev2005
2 Replies
5. UNIX for Dummies Questions & Answers
I have this output:
uniquemember=uid=315kthatch,ou=people,ou=client315,dc=paisleyhosting,dc=com
and i want the output to be just this:
315kthatch
I need it to be generic tho, because I have hundreds of lines of output, and the preceding numbers are not always 315. So I would need... (3 Replies)
Discussion started by: kthatch
3 Replies
6. UNIX for Dummies Questions & Answers
Hi again. Sorry if it seems like I'm spamming the boards a bit, but I figured I might as well ask all the questions I need answers to at once, and hopefully at least get some.
I have installed Solaris 10 on a server. The default text editors are there (vi, ex, ed, maybe others, I know emacs is... (4 Replies)
Discussion started by: EugeneG
4 Replies
7. Shell Programming and Scripting
Ive got some output in a file that looks exactly like this:
1
-----------
1542
1 record(s) selected.
How do I just extract that 1542 and drop it into another file or (preferrably) a variable (using a ksh script) (9 Replies)
Discussion started by: rdudejr
9 Replies
8. UNIX for Dummies Questions & Answers
How does one escape the left bracket in awk?
For example:
| awk 'gsub ("
I'm sure it's pretty simple, I'm just a noob. (1 Reply)
Discussion started by: TheCrunge
1 Replies