Jonas Meurer wrote: > On 17/12/2008 Christian Jaeger wrote: > >> Jonas Meurer wrote: >> >>> if [ "$(dmsetup table $depnode 2> /dev/null | cut -d' ' -f3)" != "crypt" ]; >>> then >>> get_lvm_deps "$depnode" >>> >>> >> It seems you have missed that in the first line above, $depnode is *not* >> quoted. So going these extra steps to be safe and quote the variable in >> the second line is pointless. This is what I did mean when I said >> ~"since it is used unquoted anyway above". >> >> Correct would be: >> >> if [ "$(dmsetup table "$depnode" 2> /dev/null | cut -d' ' -f3)" != "crypt" >> ]; then >> > > You're right, but i'm not sure about the quotes inside quotes. Is that a > clean solution either? >
Yes, that's the clean way, to the best of my knowledge. Note: it does not add double quotes around what the $depnode variable contains; but instead those *are* those same kinds of quotes that you are using in the second line. Shell quoting isn't straightforward to understand or to explain (at least I haven't taken the time to hunt down or write myself an explanation), but once you got it you can verify that it is precise. Christian. -- To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org