shell - Space separated arguments in bash -
shell - Space separated arguments in bash -
#!/bin/bash ret=`zenity --entry ` zenity --entry --text=$ret
here sec instruction prints first word of string. how take string can contain white spaces ??
with this:
zenity --entry "--text=$ret" that should nowadays entire --text=thing spaces in it single argument.
of course, zenity executable must still able handle arguments spaces in them different issue.
by way of example, see next script executable:
#!/bin/bash echo "[$1]" "[$2]" when run without , quotes, next results:
pax> ./testprog.sh 2 args [two] [args] pax> ./testprog.sh "one arg" [one arg] [] bash shell
Comments
Post a Comment