I am in critical need of help, Thanks a ton for your help.
I need to know how to pass the shell argument into nawk code in AIX. so that my file gets passed into that awk script and it can execute it part.
To be detail, i have more than 100 files and in those files a particular field need t o encrypt. i have a nawk script which does that part, I will share the layout here.
I am calling this script (a.ksh) from another main script and need to pass two arguemnts (file1 in above code --> file name should the first arguemnt) and second argument in while statement
My script execution should be like this
ksh a.ksh <filename> <length> > OUTPUTFILE
finally my code should like this
Your help on early is much appreciated. Please help me as I m in desperate need of this solution.
Assuming there's one 'Mapping_file'... Iterate through all the files to be processed with the below 'template' substituting 'file1'...
Something to start with....
If so desperate, why don't you try the examples and hints given and adapt if needed? Like
Unfortunately, the structures of your shell scripts and calls therein are not clear to me. Above will work if awk is called like awk '...' MAPFILE $1 $2 from within encrypt.ksh.
Shell Script Gurus,
I am writing a shell script which needs User ID's to pass as an Arguments in command line while executing.
Can this be doable? I've never done this, If you give a sample script that would be helpful, Thanks. (1 Reply)
Hi all,
I am working on a project, in which I have to connect to Bluetooth low energy device. I am able to connect and do data transfer from command line. But I want to do from script
Here is my script
#!/bin/bash
#sudo hcitool -i hci0 lescan
sleep 1
sudo hcitool -i hci0 lecc --random... (8 Replies)
#!/bin/awk -f
BEGIN {
FS=":";
}
{
if ( $7 == "" ) {
print $1 ": no password!";
}
}
I want to execute this program for a particular user to check for his password from the file /etc/passwd (as the input file) and the user details to be given... (1 Reply)
Hi All,
I tried googling but so far no luck, can someone tell me how pass the variable value used inside the
nawk command to shell. In the below script i get the value of $c (without color: Total Executed: " c ")
but the printf which is outside the nawk command doesn't print the value or it... (4 Replies)
I need to parse log files using nawk, but I'm not able to pass script input argument (date) to nawk, for example:
------------
#!/bin/ksh
read date
nawk -F, '{if($1==date) print $4" "$5}'
-------------
Is there a way to pass an argument to nawk from shell script.
Many thanks... (8 Replies)
I have a task. The scenario is like this. I have a operation program (OPR1) , whose function is to simply double the (single)value it receives as input.
I have to write a script to operate the OPR1 and save its output in a file.
Later, I have to modify the script so as to be able to operate ... (0 Replies)
I am trying to pass max as a sommand line argument when I call awk.
Made the modification in the BEGIN but it is not working
I'm getting an error as below:
awk: txsrx.awk:82: (FILENAME=jcd.tx FNR=4161) fatal: cannot open file `40' for reading (No such file or directory)
Somehow it... (2 Replies)
How do we pass multiple arguments into awk :
name=john
age=12
now i have to pass both age and name into awk.. how to do it?
like : awk -v var=... (4 Replies)
Hi,
I have a shell script called ftp.sh which is running continously in background.
I tried passing arguments to this script but it did not worked out.
Below is ftp.sh script. Please help me
case $param in
start) sleep_func "300"
echo "!ksh $scr_ddir/ftp.sh... (1 Reply)
Hi,
I have two shell variables $t1 and $t2 which I need to pass to a function in a shell script. The function will do some computation with those two variables and echo the resultant. But I do not know how to pass teh arguments.
The function written is
f1()
{......
........
}
What should... (3 Replies)