Three of hundreds of possible ways:
You can't use the second form if the string you want printed between the quotes is the expansion of a shell variable.
This User Gave Thanks to Don Cragun For This Post:
hello,
can any help me how to can pass array as command line argument in korn shell.
also how to read a array from command line.
thanks
spandu (2 Replies)
Say I want to get the value of last command line argument using the value in $# (or some other way if u can suggest) how do I do it??
$"$#"
`$"$#"`
These don't work :( (4 Replies)
Hi ,
I have a piece of code ...wherein I need to assign the following ...
1) A command line argument to a variable
e.g origCount=ARGV
2) A unix command to a variable
e.g result=`wc -l testFile.txt`
in my awk shell script
When I do this :
print "origCount" origCount --> I get the... (0 Replies)
Hi,
I have a very simple C program which will run in UNIX. When i am passing * as the command line argument, i am gettig the below output.
Program:
#include <stdio.h>
#include "mylibrary.h"
int **environ;
int main(int argc,char *argv)
{
int i;
printf("\nHello... (2 Replies)
I have to write a script to determine whether given command line argument ($1) contains "*" symbol or not, if $1 does not contains "*" symbol add it to $1, otherwise show message "Symbol is not required". For e.g. If we called this script q5 then after giving ,
$ q5 /bin
Here $1 is /bin, it... (5 Replies)
Hi Guys
When I run the below command
ssh -o 'PasswordAuthentication yes' -o 'PreferredAuthentications publickey' -i $HOME/.ssh/id_dsa Server_Name
I found the below error
ommand-line line 0: Missing yes/no argument
Kindly help me to sort out
Double post, continued... (0 Replies)
HI ,
I am new to csh. I need to pass some command line arguments like
./abc.sh -os Linux -path abc -tl aa -PILX 1
I have defined the loop as shown below. But its taking "-os" switches as arguments. Its treating them as arguments.
How to resolve it?
while ( $#argv != 0 )
switch ($argv)
... (7 Replies)
I'm trying to write a bash script called YN that looks like the following
YN "Specify a question" "doThis" "doThat"
where "doThis" will be executed if the answer is "y", otherwise "doThat".
For example
YN "Do you want to list the file dog?" "ls -al dog" ""
Here's my attempt... (3 Replies)
I would like to search and print a match of the user entered $ARGV.
Im terrible with hashes and really dont know where to go from here.
The example data file
name location phone
Bugs holeintheground 5551212
Woody holeinthetree 6661313
Jerry holeinthewall 7771414... (4 Replies)
Hi Guys, I'm trying to work out how to add a command line argument inside single quotes. Would anyone be able to help please as I'm going mad :)
I want to be able to place the filename on command line and it then be used in a script but it needs to have quotes surrounding it.
Thanks in... (4 Replies)
Discussion started by: mutley2202
4 Replies
LEARN ABOUT FREEBSD
alarm
ALARM(3) BSD Library Functions Manual ALARM(3)NAME
alarm -- set signal timer alarm
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <unistd.h>
unsigned int
alarm(unsigned int seconds);
DESCRIPTION
This interface is made obsolete by setitimer(2).
The alarm() function sets a timer to deliver the signal SIGALRM to the calling process after the specified number of seconds. If an alarm
has already been set with alarm() but has not been delivered, another call to alarm() will supersede the prior call. The request alarm(0)
voids the current alarm and the signal SIGALRM will not be delivered.
Due to setitimer(2) restriction the maximum number of seconds allowed is 100000000.
RETURN VALUES
The return value of alarm() is the amount of time left on the timer from a previous call to alarm(). If no alarm is currently set, the
return value is 0.
SEE ALSO setitimer(2), sigaction(2), sigsuspend(2), signal(3), sleep(3), ualarm(3), usleep(3)HISTORY
An alarm() function appeared in Version 7 AT&T UNIX.
BSD April 19, 1994 BSD