Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Missing argument for option: n Error Post 302991639 by Info_Geek on Tuesday 14th of February 2017 08:20:26 PM
Old 02-14-2017
Hi,

When I run the below script from other unix server in same network It ask password and need to give it manually. Is there anyway how to give the password for other server when it's in the same network in the below script .

Code:
#!/bin/sh
ssh -t user@server "cd /home/runAJobCli/; bash" ./Myscript.sh $1 $2

What will be the syntax.


Moderator's Comments:
Mod Comment Please use CODE tags as required by forum rules!

Last edited by RudiC; 02-15-2017 at 06:54 AM.. Reason: Added CODE tags.
 

9 More Discussions You Might Find Interesting

1. Solaris

ps: 65535 is an invalid non-numeric argument for -p option

I want to figure out what is the reason of error message I have in Solaris 10. Why Solaris 10 dosn't recognize 65535? ps: 65535 is an invalid non-numeric argument for -p option usage: ps 'format' is one or more of: Thank you (5 Replies)
Discussion started by: gogogo
5 Replies

2. Shell Programming and Scripting

option followed by : taking next option if argument missing with getopts

Hi all, I am parsing command line options using getopts. The problem is that mandatory argument options following ":" is taking next option as argument if it is not followed by any argument. Below is the script: while getopts :hd:t:s:l:p:f: opt do case "$opt" in -h|-\?)... (2 Replies)
Discussion started by: gurukottur
2 Replies

3. Shell Programming and Scripting

Cannot compare argument in if statement in csh/grep command if argument starts with “-“

If ($argv == “-debug”) then Echo “in loop” Endif But this is not working. If I modify this code and remove “-“, then it works. Similarly I am getting problem using grep command also Grep “-debug” Filename Can someone please help me on how to resolve these... (1 Reply)
Discussion started by: sarbjit
1 Replies

4. Shell Programming and Scripting

command-line line 0: Missing yes/no argument

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)
Discussion started by: Pratik4891
0 Replies

5. Shell Programming and Scripting

find: missing argument to `-exec' while redirecting using find in perl

Hi Friends, Please help me to sort out this problem, I am running this in centos o/s and whenever I run this script I am getting "find: missing argument to `-exec' " but when I run the same code in the command line I didn't find any problem. I am using perl script to run this ... (2 Replies)
Discussion started by: ramkumarselvam
2 Replies

6. UNIX for Advanced & Expert Users

Error:--test: argument expected--Even though i give an argument.

Hi All, I am running the script VBoxManage list vms |sed 's/"//g' | cut -d " " -f1 > har1out.mytxt result=`cat har1out.mytxt | grep $1' echo $result echo $1 { if then echo pass else echo fail fi (2 Replies)
Discussion started by: harsha85
2 Replies

7. Shell Programming and Scripting

passing an option as an argument!

Hi Folks I have got to the point where I can specify the arguments but how to pass an option is still mystery to me. Example: temp.csh a b c d set temp1 = $argv set temp2 = $argv set temp3 = $argv echo $temp1 a echo $temp2 b echo $temp3 c d I WANT: temp.csh a b c d -S 1 set temp1... (2 Replies)
Discussion started by: dixits
2 Replies

8. Shell Programming and Scripting

ksh - default value for getopts option's argument

Hello everyone, I need help in understanding the default value for getopts option's argument in ksh. I've written a short test script: #!/bin/ksh usage(){ printf "Usage: -v and -m are mandatory\n\n" } while getopts ":v#m:" opt; do case $opt in v) version="$OPTARG";; ... (1 Reply)
Discussion started by: da1
1 Replies

9. UNIX for Beginners Questions & Answers

Find: missing argument to `-mtime'

this find command works when using manually on the command line -- $ ls -latr file*.log -rw-r--r-- 1 oracle dba 75 Jan 4 05:00 file_2.log -rw-r--r-- 1 oracle dba 75 Jan 4 05:00 file_1.log $ $ find . ! -name -prune -type f -name "file*.log" -daystart -mtime 2 ./file_1.log ./file_2.log $... (8 Replies)
Discussion started by: wtolentino
8 Replies
NWPQJOB(1)							      nwpqjob								NWPQJOB(1)

NAME
nwpqjob - Perform operations on the jobs in NetWare print queue SYNOPSIS
nwpqjob [ -h ] [ -S server ] [ -U user name ] [ -P password | -n ] [ -C ] < -d | -r > queue_name job_ID [ another_job_ID ... ] pqrm [ -h ] [ -S server ] [ -U user name ] [ -P password | -n ] [ -C ] queue_name job_ID [ another_job_ID ... ] DESCRIPTION
pqrm or nwpqjob -d remove specified jobs from the specified NetWare print queue. nwpqjob -r resumes specified job in the specified NetWare print queue. nwpqjob looks up the file $HOME/.nwclient to find a file server, a user name and possibly a password. See nwclient(5) for more information. Please note that the access permissions of .nwclient MUST be 600, for security reasons. OPTIONS
-d Delete specified print job(s). This is default operation for pqrm. -r Resume (clear OPERATOR HOLD and USER HOLD flags) specified print job(s). queue_name queue_name is used to specify queue. You can not use wildcards in the name. job_ID , another_job_ID job_ID is used to specify which job has to be deleted or resumed. -S server server is the name of the server you want to use. -U user name If the user name your NetWare administrator gave to you differs from your unix user-id, you should use -U to tell the server about your NetWare user name. -P password You may want to give the password required by the server on the command line. You should be careful about using passwords in scripts. -n -n should be given to mount shares which do not require a password to log in. If neither -n nor -P are given, pqstat prompts for a password. -C By default, passwords are converted to uppercase before they are sent to the server, because most servers require this. You can turn off this conversion by -C. SEE ALSO
nwclient(5), nprint(1), slist(1), ncpmount(8), ncpumount(8), pqlist(1), pqstat(1) CREDITS
nwpqjob was written by Petr Vandrovec (vandrove@vc.cvut.cz). Resuming of print jobs was added by Zdenek Roub (zroub@ssps.zcu.cz). nwpqjob 07/16/2003 NWPQJOB(1)
All times are GMT -4. The time now is 08:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy