in reply to safe quoting for shell parameters

I came up against the same problem a while ago. The result is Robust parameter quoting for *nixoid shells.

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re: safe quoting for shell parameters
by Gunstick (Initiate) on Jan 02, 2004 at 07:28 UTC
    yes, that's a part of a solution, but it's not doing the main job: parsing a string of parameters and quoting them. It just quotes one parameter.

    See:
    ls a b c
    is transformed into
    ls 'a b c'
    which results in ls: a b c: No such file or directory


    Useful? No :-) And splitting by spaces won't help, e.g.
    ls "a' b" c gives
    ls '"a'\' 'b"' 'c' instead of
    ls 'a'\'' b' 'c'