Perl : accept multiple user entered command line arguemnts
I am trying to create a script that will accept multi input from the user (really just me), then execute those command on a remote device.
My question is if the I enter "No" at the confirmation point "Are these statements correct y or n ?", what is the best way to go back and start over ? I have been trying different things with while and until flags but nothing is working.
Hi everyone,
Can someone possibly help me with this problem I am having please.
I wrote a Korn shell script to manipulate currency amounts in a way that a person could use this script to determine the minimum number of coins required to make a certain amount.
for example when entered on the... (2 Replies)
I have a script like this--
#!/bin/ksh
echo "To pad a 0 before digits from 1-9"
for i in $*
do
echo $i | sed 's//'0'/g'
done
I run this script as
ksh name 1 2 23 34
The output should be
01 02 23 34
Help me in modifying this script.
Thanks
Namish (2 Replies)
Dear All,
The sqlplus 'Accept' command is not waiting for user input when I include the command within a shell script.
Note: The 'Accept' command is working fine if I execute it in a SQLPLUS Prompt.
Please fins the below sample script which i tried.
SCRIPT:
--------
#!... (4 Replies)
Hi
I want to accept multiple lines input with spaces from User and i have a working code like this.
char sRes;
char sReq;
printf("Please enter request:");
scanf("%",sReq); /* Accept the input from user */
printf("\nPlease enter response:");
scanf("%",sRes);
but the... (4 Replies)
Say I have a ksh program called test.ksh which has several defined arrays inside it such as array1,array2,array3...These arrays contain strings.
I also have a method in the program:
for x in $1
do
....(#do something)
done
So, when the user enteres: ./test.ksh array1, I want to... (3 Replies)
Hello
Does the unix korn shell provide a function to convert number entered in command line argument to text or Character so that in next step i will convert Chr to Hex (6 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
1) The script is executed in the Korn shell.
2) Name the shell script file is asg6s.
3) The asg6s file is... (7 Replies)
I am looking for help in processing of those options: '-n' or '-p'
I understand what they do and how to use them.
But, I would like to use them with more than one file (and without any shell-loop; loading the 'perl' once.)
I did try it and -n works on 2 files.
Question is:
- is it possible to... (6 Replies)
Discussion started by: alex_5161
6 Replies
LEARN ABOUT SUNOS
lpmove
lpmove(1M) System Administration Commands lpmove(1M)NAME
lpmove - move print requests
SYNOPSIS
lpmove [request-ID] destination
lpmove destination1 destination2
DESCRIPTION
The lpmove command moves print requests queued by lp(1) or lpr(1B) between destinations.
The first form of lpmove moves specific print requests (request-ID) to a specific destination.
The second form of the lpmove command moves all print requests from one destination (destination1) to another (destination2). This form of
lpmove also rejects new print requests for destination1.
lpmove moves individual requests or entire queues only between local printers or between remote printers, not between a local and a remote
printer. You can move only requests that were not previously transferred to the server.
When moving requests, lpmove does not check the acceptance status of the destination to which the print requests are being moved (see
accept(1M)). lpmove does not move requests that have options (for example, content type or requiring a special form) that cannot be handled
by the new destination.
OPERANDS
The following operands are supported:
request-ID The specific print request to be moved. Specify request-ID as the identifier associated with a print request as reported by
lpstat. See lpstat(1).
destination The name of the printer or class of printers (see lpadmin(1M)) to which lpmove moves a specified print request. Specify
destination using atomic, POSIX-style (server:destination) syntax.
destination1 The name of the destination from which lpmove moves all print requests. Specify destination using atomic, POSIX-style
(server:destination) syntax.
destination2 The name of the destination to which lpmove moves all print requests. Specify destination using atomic, POSIX-style
(server:destination) syntax.
See printers.conf(4) for information regarding the naming conventions for atomic names and standards(5) for information regarding POSIX.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
non-zero An error occurred.
FILES
/var/spool/print/* LP print queue.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWpcu |
+-----------------------------+-----------------------------+
SEE ALSO lp(1), lpr(1B), lpstat(1), accept(1M), lpadmin(1M), lpsched(1M), printers.conf(4), attributes(5), standards(5)
System Administration Guide: Advanced Administration
SunOS 5.10 8 Feb 2001 lpmove(1M)