View Single Post
Old 1st November 2017
hanzer's Avatar
hanzer hanzer is offline
Real Name: Adam Jensen
just passing through
 
Join Date: Oct 2013
Location: EST USA
Posts: 307
Default

Quote:
Originally Posted by GarryR View Post
[snip]
Wondering if anyone knows how to maybe add some input option, so that it prompts me to
put in the name of the image I want as a background.
[snip]
This isn't what you asked for - it doesn't simulate a dialog - but the method might get the job done in a more straightforward manner...

How can I pass a command line argument into a shell script?

Example:
$HOME/bin/test.ksh
Code:
#!/bin/ksh
echo $0
echo $1
echo $2
Demo:
Code:
hanzer@lucidrine:/home/hanzer:859 $ test.ksh                                                              
/home/hanzer/bin/test.ksh


hanzer@lucidrine:/home/hanzer:860 $ test.ksh foo
/home/hanzer/bin/test.ksh
foo

hanzer@lucidrine:/home/hanzer:861 $ test.ksh foo bar
/home/hanzer/bin/test.ksh
foo
bar
hanzer@lucidrine:/home/hanzer:862 $ test.ksh foo bar baz
/home/hanzer/bin/test.ksh
foo
bar
hanzer@lucidrine:/home/hanzer:863 $
Reply With Quote