10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Trying to do so
echo "111:222:333" |awk -F: '{system("export TESTO=" $2)}'But it doesn't work (2 Replies)
Discussion started by: urello
2 Replies
2. Shell Programming and Scripting
I am trying to test if I can replace a regular expression in 'nawk' with a variable.
Please let me know why it is not working. I am using ksh88i on solaris8
I am trying use this test as a building block to filter active external DNS connections.
Ideally I want to pass variable defined... (4 Replies)
Discussion started by: kchinnam
4 Replies
3. Shell Programming and Scripting
Hi - The following nawk is not working and trying to understand why!
nawk -v t="internal_order" '/SAP_RM_ADMIN_SCHEMA/ && ("" toupper(t)) || /SAP_RM_ADMIN_SCHEMA/ && ("" tolower(t))' PBFD100.ksh
My intention is to retrieve the line containing SAP_RM_ADMIN_SCHEMA.internal_order but its just not... (6 Replies)
Discussion started by: anduzzi
6 Replies
4. Shell Programming and Scripting
Hi,
Is it possible in awk/nawk to pass two or more variables in the -v flag? That is:
X=1
Y=2
nawk -v X=$X Y=$Y.....
Thanks in advance. (7 Replies)
Discussion started by: daytripper1021
7 Replies
5. Shell Programming and Scripting
Hi all
I have got a file digits.data containing the following data
1 3 4
2 4 9
7 3 1
7 3 10
I am writing a script that will pass an argument from C-shell to nawk command. But it seems the values in the nawk comman does not get set. the program does not print no values out. Here is the... (2 Replies)
Discussion started by: ganiel24
2 Replies
6. Shell Programming and Scripting
nawk '($1 ~ "1000") && ($1 ~ "5665" ) { sub ($6,"89");flag =1;print }' old.txt >> new.txt I want to set a flag in awk , if the both conditions are met. I want to pass this flag to shell Can anyone please help me on this (1 Reply)
Discussion started by: prav076
1 Replies
7. Shell Programming and Scripting
i'm new to shell scripting and have a problem please help me
in the script i have a nawk block which has a variable count
nawk{
.
.
.
count=count+1
print count
}
now i want to access the value of the count variable outside the awk block,like..
s=`expr count / m`
(m is... (5 Replies)
Discussion started by: saniya
5 Replies
8. Shell Programming and Scripting
I am trying to make a simple script in which i take input from shell and then forward the value to
nawk (BEGIN).
but when i run below mention script so it give no output.
echo "Enter TRUNK GROUP:"
read TGR
cat /omp-data/logs/5etr/080422.APX | nawk -F"|" -v P=$TGR '
BEGIN {
TG=P;... (1 Reply)
Discussion started by: wakhan
1 Replies
9. UNIX for Dummies Questions & Answers
After searching through books and the internet for days I can't seem to find an example of this.
I'm trying to pass a variable from a for loop into nawk but can't seem to get all the syntax right.
my script (thanks to anbu23 for nawk help) is this:
for customers in `cat customers.txt`
do... (3 Replies)
Discussion started by: Ant1815
3 Replies
10. Shell Programming and Scripting
Hi guy's
Im trying to pass variables into nawk and then match them on a value within a record but it don't seem to be working. If i put in the dates i want to see then it works fine..
#!/usr/bin/ksh -x
YEST=$(/usr/local/bin/perl -e... (8 Replies)
Discussion started by: plimpix
8 Replies