Ah. Ok. I see. You think you need to use single quotes. But single quotes does not allow Variables-expansion inside.
You can just use double quotes. Should work like you want it:
The quotes are only there to keep the enclosed parameter in one piece. They are not delivered within the parameter. If the quotes are missing a parameter with spaces in it would be split up at those spaces(Not what you want). Thatswhy "...." and '...' can be exchanged here. The difference between the two is explained by your example: '...' protects from variables/subprocess/... expansion. "..." however allows this.
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 would like to use a string as a command line argument...is this possible using TCSH? For example say my script is called TEST and I would like to pass a string into my script stating why the test failed.
EXAMPLE:
TEST "Failed due to missing statement" (4 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)
Discussion started by: LeoKSimon
3 Replies
LEARN ABOUT OSF1
pts_apropos
PTS_APROPOS(1) AFS Command Reference PTS_APROPOS(1)NAME
pts_apropos - Displays each help entry containing a keyword string
SYNOPSIS
pts apropos -topic <help string> [-help]
pts ap -t <help string> [-h]
DESCRIPTION
The pts apropos command displays the first line of the online help entry for any pts command that has in its name or short description the
string specified by the -topic argument.
To display the syntax for a command, use the pts help command.
OPTIONS -topic <help string>
Specifies the keyword string to match, in lowercase letters only. If the string is more than a single word, surround it with double
quotes ("") or other delimiters.
-help
Prints the online help for this command. All other valid options are ignored.
OUTPUT
The first line of a command's online help entry names it and briefly describes its function. This command displays the first line for any
pts command in which the string specified by the -topic argument is part of the command name or first line.
EXAMPLES
The following command lists all pts commands that include the word "create" in their names or short descriptions:
% pts apropos create
creategroup: create a new group
createuser: create a new user
PRIVILEGE REQUIRED
None
SEE ALSO pts(1), pts_help(1)COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved.
This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas
Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell.
OpenAFS 2012-03-26 PTS_APROPOS(1)