10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
All of my machines (various open source derivatives on x86 and amd64) store argv above the stack (at a higher memory address). I am curious to learn if any systems store argv below the stack (at a lower memory address).
I am particularly interested in proprietary Unices, such as Solaris, HP-UX,... (9 Replies)
Discussion started by: alister
9 Replies
2. Shell Programming and Scripting
Hi guys,
i'm trying to solve this problem.
I have to run something like
cat file1.txt | awk -f script.awk 10
if i'm in the awk script, how can i take the parameter :10 ??:wall:
i try something like :
BEGIN{
var=argv
}
{..}
END{..}
but obviously is not correct... (5 Replies)
Discussion started by: heaven25
5 Replies
3. Shell Programming and Scripting
I have written this code in an awk script.
BEGIN {
print "ARGV", ARGV
if ( match(ARGV,/-u/) || match(ARGV,/--usg/) ) {
print "MATCH -u:",match(ARGV,/-u/), RSTART, RLENGTH
print "MATCH --usg:",match(ARGV,/--usg/), RSTART, RLENGTH
usage()
exit(1)
}
}
I want... (7 Replies)
Discussion started by: kristinu
7 Replies
4. Shell Programming and Scripting
Hello all,
Here is what my bash script does: sums number columns, saves the tot in new column, outputs if tot >= threshold val:
> cat getnon0file.sh
#!/bin/bash
this="getnon0file.sh"
USAGE=$this"
InFile="xyz.38"
Min="0.05"
#
awk '{sum=0; for(n=2; n<=NF; n++){sum+=$n};... (4 Replies)
Discussion started by: catalys
4 Replies
5. Programming
Hi,
Can somehelp help how to list file in a dir? (5 Replies)
Discussion started by: Learnerabc
5 Replies
6. Shell Programming and Scripting
mode=$1
psg telnetd | awk current=`date +%M`'{
printf ("mode is %s",mode)
printf ("mode is %s",ARGV)
}'
at command prompt when i run the script along with the argument i get only--
'mode is '
argument is not printed.(If the argument is... (3 Replies)
Discussion started by: Anteus
3 Replies
7. Shell Programming and Scripting
I want to be able to call in my file and make it do it's magic by basically giving it:
FileNAME.pl searchTerm fileToSearch
It runs, and gives me the answers I want, however, it gives me an error:
Can't open GAATTC: No such file or directory at .//restriction_map_better.pl
line 15... (2 Replies)
Discussion started by: silkiechicken
2 Replies
8. Programming
The following program takes two command line arguments.
I want the second argument (fileCount) to be stored/printed as a int value. I tried my best to typecast the char to int (check the printf statement at last) but is not working...the output is some junk value.
This program is in its... (3 Replies)
Discussion started by: frozensmilz
3 Replies
9. Shell Programming and Scripting
this is in one of my scripts...
if ($#argv == 0) then
echo 'blah bla'
exit 0
endif
I want it to be something like this...
if ($#argv == 0 OR $argv >=3)
echo 'blah bla'
exit 0
endif
so when the arguments are none, or greater than three I want this "if then" to take over. how? I... (5 Replies)
Discussion started by: ajp7701
5 Replies
10. Programming
I have a program which I wish to modify. It used to be run from the command line, but now I wish to change this so it can be used as a function.
The program has complex argument processing so I want to pass my paramters to as if it were being called by the OS as a program.
I have tried to... (2 Replies)
Discussion started by: mbb
2 Replies