Passing awk variable argument to a script which is being called inside awk
consider the script below
here the script that i am calling is someScript.sh and to that i want to pass the contents of alDFid , i itred giving it in quotes , $ but none of it worked. even tried printf "%s",alDFid even this is not working.
Does anyone know how to pass argument to script from Awk with awk variable??
ALSO
why does
inside cmd="" wont work.. it wont consider awk inside this command. it keeps throwing error as
I am writing a shell script.
Now i need to read in a string and send it to an awk file to compare and search for compatible record.
I wrote it like tat:
read serial | awk -f generate.awk data.dat
p/s: the data file got 6 field.
According to an expert, we can write it like tat:
read... (1 Reply)
hi;
i have a file containing lines like:
1|1069108123|96393669788|00963215755711|2|0|941||;serv:Pps6aSyria;first:0;bear
i want to extract the second, third and fourth record of each line and store it in a file ";" seperated
this is what i wrote
while read line
do
... (3 Replies)
Hello all,
I'm trying to run a script of this format -
for i in $(cat <file>); do
grep $i <file1>|awk '{print $i, $1, $2}'
It's not working - does anyone know how this can be done?
Khoom (5 Replies)
i'm trying to pass a numerical argument with function xyz to print specfic lines of filename, but my 'awk' syntax is incorrect.
ie
xyx 3 (prints the 3rd line, separated by ':' of filename)
function xyz() {
arg1=$1
cat filename | awk -F: -v x=$arg1 '{print $x}'
}
any ideas? (4 Replies)
Dear Conerned,
I am facing a situation where i need to pass an argument which is non-awk variable like
day=090319
awk '/TID:R/ && /TTIN:/' transaction.log
I want to add this day variable like below
awk '/TID:R$day/ && /TTIN:/' transaction.log
But it is not working. :confused: (1 Reply)
So, I have this script. It reads a CSV file that has a mixture of object names with IP addresses (parsing out that part I have working), and object names which have a DNS name. I want to be able to run a "dig +short" based off of the name given to me in the line of the awk script, and then deal... (6 Replies)
I have one working awk command line. Which taking data from the “J1202523.TXT” file and generating the “brazil.dat” file. PFB code.
awk '{ DUNS = substr($0,0,9);if ( substr($0,14,3) == "089" ) print DUNS }' J1202523.TXT > Brazil.dat
But now I want to pass two parameter as a command line argument... (4 Replies)
I have the awk script below and things go wrong when I do
awk -v dsrmx=25 -f ./checkSRDry.awk --usage
I basically want to override the usual --usage and --help that awk gives.
How do people usually handle this situation when you also want to supply your own usage and help
concerning the... (2 Replies)
Learning, stumbling! My progress in shell scripting is slow. Now I have this doubt:
I have the following file (users.txt):
AU0909,on
AU0309,off
AU0209,on
AU0109,off
And this file (userson.txt)
AU0909
AU0209
AU0109
AU0309
I just want to set those users on userson.txt to "off" in... (14 Replies)
Hi,
I am calling a Perl script in my shell script. When Perl script is executed it asks for a answer to be entered by user from terminal. How can i pass that value from my shell script ??
I know I can change perl script to default the answer but i dont have access to do that so only option i... (5 Replies)
Discussion started by: varun22486
5 Replies
LEARN ABOUT SUNOS
list-file-users
asadmin-list-file-users(1AS) User Commands asadmin-list-file-users(1AS)NAME
asadmin-list-file-users, list-file-users - lists the file users
SYNOPSIS
list-file-users --user admin_user [--password admin_password] [--host localhost] [--port 4848] [--secure|-s] [--passwordfile filename]
[--terse=false] [--echo=false] [--interactive=true] [--authrealmname auth_realm_name]
DESCRIPTION
Lists all the file users. If the auth_realm_name is not specified, an entry is created in the default keyfile. If auth_realm_name is speci-
fied, an entry is created in the keyfile where the auth-realm name in the domain.xml file points to.This command is supported in remote
mode only.
OPTIONS --user authorized domain application server administrative username.
--password password to administer the domain application server.
--host machine name where the domain application server is running.
--port port number of the domain application server listening for administration requests.
--secure if true, uses SSL/TLS to communicate with the domain application server.
--passwordfile file containing the domain application server password.
--terse indicates that any output data must be very concise, typically avoiding human-friendly sentences and favoring well-
formatted data for consumption by a script. Default is false.
--echo setting to true will echo the command line statement on the standard output. Default is false.
--interactive if set to true (default), only the required password options are prompted.
--authrealmname name, in the domain.xml file, where you have different stores for file auth realm.
EXAMPLES
Example 1: Using the list-file-users command
asadmin> list-file-users --user admin1 --password adminadmin1
--host pigeon --port 5001 --authrealmname auth-realm1
Command list-file-user executed successfully
EXIT STATUS
0 command executed successfully
1 error in executing the command
asadmin-delete-file-user(1AS), asadmin-update-file-user(1AS), asadmin-create-file-user(1AS), asadmin-list-file-groups(1AS)J2EE 1.4 SDK March 2004 asadmin-list-file-users(1AS)