10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Field1=””
Field2=””
Field3=””
Field4=””
Field5=””
USER INPUT UP TO 5 FIELDS
awk -F , '{ if ( $3 == Field1 && $6 == Field2 && $8 == Field3 && $9 == Field4 && $10 == Field5) print $0 }' /tmp/rodney.outD
INPUT FILE (Rodney.outD):
... (3 Replies)
Discussion started by: rmerrird
3 Replies
2. Programming
Hi,
does someone know how to make a keyboard data input
in the AWK programming language ?
Regards
Zabo (6 Replies)
Discussion started by: Zabo
6 Replies
3. Shell Programming and Scripting
I am trying to allow a user to enter in text and then store that text in a variable $gene to run in an awk command in which those values are used to run some calculations. I am getting syntax errors however, when I try. Thank you :).
The awk runs great if it is a pre-defined file that is used,... (7 Replies)
Discussion started by: cmccabe
7 Replies
4. Shell Programming and Scripting
Hi Jim,
I have following script,i which i need to take dynamic value .
script,
nawk -v v1=grep"INT_EUR" $propertifilename | cut -d"=" -F2` -F'~' '{if (NF-1 !=v1)
{print "Error in " $0 " at line number "NR" tilde count " N-1}}' $filename
In the above script i want to use INT_EUR as a variable... (2 Replies)
Discussion started by: Ganesh Khandare
2 Replies
5. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
(o) Checkout an auto part: should prompt the user for the name of the auto part
and borrower's name:
Name:... (2 Replies)
Discussion started by: SlapnutsGT
2 Replies
6. UNIX for Dummies Questions & Answers
Ok, I am brand new to UNIX and I am trying to learn a cross between basic script and database use. I had got some ideas off the net on simple ideas for learning UNIX. I am working on creating a simple phone book program that allows myself to enter our employees from work into a phone book text... (0 Replies)
Discussion started by: georgefurbee
0 Replies
7. Shell Programming and Scripting
Hi,
I have a ksh which peocess and get me data from 3 days...
ie if i process it on jan 28.. it gets data for 25, 26 and 27.... the process run every day and get previous 3 days data...all this data is appened to a file lets call time.out
Now time.out cannot have deplicate data so what i want... (10 Replies)
Discussion started by: bhagya2340
10 Replies
8. Shell Programming and Scripting
hi
i have records in my input file like this
aaa|1234||2bc||rahul|tamilnadu
bba|2234||b4c||bajaj|tamilnadu
what i am expecting is in between two pipes if there is no character it should be replaced with null or 0
so my file will look like this
aaa|1234|null|2bc|0|rahul|tamilnadu... (4 Replies)
Discussion started by: trichyselva
4 Replies
9. Shell Programming and Scripting
I am trying to write a awk script that prompts user for input to set the FILENAME varable. I can get it set, but I think awk is not doing anything with it.
this is what I have so far
#!/usr/bin/nawk -f
BEGIN {
FILENAME = ""
printf "Enter name of file to check in : "
... (2 Replies)
Discussion started by: timj123
2 Replies
10. Shell Programming and Scripting
Using the following I'm trying to print the user's response to the prompt Y / N but I get nothing other than the contents of $1?
awk '{
printf($1 " ? (Y/N)")
getline myresponse < "-"
system("read myresponse")
if (myresponse == "Y")
{ print $1... (17 Replies)
Discussion started by: gefa
17 Replies