Above record each line contains 21 ~ chars in line number 4th number o ~'s are 22 so my script should give line number 4 has an 22 ~'s also my script should take a static value from property file like validate.property
contains records like
so on
so that INT_EUR has value =21 so script will check is row 1 have ~=21 or not and so on every line should get scanned and does not match gives n error .
Could you please solve this problem.
Now your questions regarding why multiple awk commands. i am not be able to take any variable inside the awk command.Please guide me what to do.
Thanks & Regards,
Ganesh
---------- Post updated at 06:28 PM ---------- Previous update was at 12:11 AM ----------
Thanks,
And sorry for that. but i was placed queary again in details as someon asked me regading the problem in details.
Thanks for giving me this worning.
---------- Post updated 10-05-10 at 10:42 AM ---------- Previous update was 10-04-10 at 06:28 PM ----------
Hi ,
Could you please reply me on my thread.Its really helpfuul for me.
Thanks & Regards,
Ganesh
Quote:
Originally Posted by fpmurphy
Please provide an example of the data that is in the $DATA_DIR/count.txt data file.
Why the need to invoke awk twice? Print the number of records at the top of the output?
Why do you need so many print statements? Why not just output the lines which are regarded as "errors"? Each print statement adds to the execution time.
Last edited by Scott; 10-04-2010 at 11:19 AM..
Reason: Please use code tags. Removed what looked like a telephone number.
i'm trying to do this (in bash darwin);
echo "give me some words: "
read a
c=2 # this is get by other ways
echo $a | awk '{print $c}' # i want to print the column given
# by de $c variable
if there is someone understand what i pretend... (3 Replies)
Hi All,
I have awk script for replacing the nth ocurance of a string in an xml file...
My code is like this
FILETYPE=xml
TAGNAME=type
OCCURANCE=$1
TAGVALUE=valueur
echo OCCURANCE:$OCCURANCE
echo TAGNAME:$TAGNAME
echo TAGVALUE:$TAGVALUE
awk -v n=$OCCURANCE -v... (1 Reply)
I am trying to print the lines with pattern and my pattern is set to a variable express
awk '/$express/{where=NR;print}' test2.log
I am not getting any data even though i have the data with the pattern. Can seomeone correct me with the awk command above? (20 Replies)
Hi,
I am trying to do the following thing
var='date'
$var
Above command substitutes date for and in turn runs the date command and i am getting the todays date value.
I am trying to do the same thing as following, but facing some problems,
unique_host_pro="sed -e ' /#/d'... (3 Replies)
HI,
This is the code I am using:
awk -v aaa="connect" 'BEGIN {IGNORECASE} /aaa/,/!/ {print NR}' bb
This does not throw any error but it does not work. Pls help
Thanks. (4 Replies)
Hello experts,
I'm stuck with this script for three days now. Here's what i need.
I need to split a large delimited (,) file into 2 files based on the value present in the last field.
Samp: Something.csv
bca,adc,asdf,123,12C
bca,adc,asdf,123,13C
def,adc,asdf,123,12A
I need this split... (6 Replies)
Hi,
Was hoping someone could help with the following:
while read line; do pntadm -P $line | awk '{if (( $2 == 00 && $1 != 00 ) || ( $2 == 04 )) print $3,$5}'; done < /tmp/subnet_list
Anyone know if it is possible to assign $3 and $5 to separate variables within the {} brackets?
Thanks... (14 Replies)
Thanks all for taking time out and reading this thread and big Thanks to all who have come forward for rescue.
Background: I have a variable "nbrofcols" that has number of columns from a data file. Now, using this count in for loop, I am trying to get the maximum length of each column present... (7 Replies)