23 Jan
2015
23 Jan
'15
2:21 p.m.
On Fri, Jan 23, 2015 at 02:59:47PM +0100, Maros Zatko wrote:
-exec guestfish --rw -i copy-in "$@" +args=$@ +while [ ""x != "$1"x ] ; do + case $(echo $@ | awk '{print $1}') in + "-h") + man $(basename $0) + exit + ;; + esac + shift 1 +done
Bit confused about what this shell fragment does. It doesn't look as if it would be safe given command line arguments containing spaces either. How about using getopt? Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-builder quickly builds VMs from scratch http://libguestfs.org/virt-builder.1.html