10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
consider the script below
sh /opt/hqe/hqapi1-client-5.0.0/bin/hqapi.sh alert list --host=localhost --port=7443 --user=hqadmin --password=hqadmin --secure=true >/tmp/alerts.xml
awk -F'' '{for(i=1;i<=NF;i++){
if($i=="Alert id") {
if(id!="")
if(dt!=""){
cmd="sh someScript.sh... (2 Replies)
Discussion started by: vivek d r
2 Replies
2. Shell Programming and Scripting
hi,
I want to implement some function to perform following task
if ; then
$TEXT = "Data_0"
else
$TEXT = $1
fi
if ; then
$Lines = 45
else
$Lines = $2
fi
Kindly suggest,
thanks (11 Replies)
Discussion started by: nrjrasaxena
11 Replies
3. Shell Programming and Scripting
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)
Discussion started by: kristinu
2 Replies
4. Shell Programming and Scripting
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)
Discussion started by: humaemo
4 Replies
5. Shell Programming and Scripting
I'm trying to figure out what's getting passed as the argument when I try to pass a directory as an argument, and I'm getting incredibly strange behavior. For example, from the command line I'm typing:
nawk -f ./test.awk ~
test.awk contains the following:
{
directory = $NF
print... (13 Replies)
Discussion started by: mrplainswalker
13 Replies
6. 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... (1 Reply)
Discussion started by: ganiel24
1 Replies
7. UNIX for Advanced & Expert Users
Hi,
Can any one tell me how to use the fourth argument of select system call.I saw example "port forwarding" on the net,but it was too complex for me to understand.Can any one explain me about the usage of exceptfds argument of select system call with simple example.
Thanks. (2 Replies)
Discussion started by: bvijaya
2 Replies
8. Shell Programming and Scripting
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)
Discussion started by: prkfriryce
4 Replies
9. UNIX for Dummies Questions & Answers
Hi,
this is my test file :
DELETE FROM TABLE
WHERE ID_INTERNAL = :TABLE.ID-INTERNAL, ID-INTERNAL-CRAZY
ID-INTERNAL-OPEN
ID-INTERNAL
/ID-INTERNAL/
I want all occurences of ID-INTERNAL replaced with a one, if ID-INTERNAL has and dash afer it , dont replace it example:... (6 Replies)
Discussion started by: seaten
6 Replies
10. UNIX for Dummies Questions & Answers
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)
Discussion started by: AkumaTay
1 Replies