[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Nontrivial Quoting Problem

From: Daniel Ciobanu
Subject: Nontrivial Quoting Problem
Date: Sun, 06 Jul 2003 06:08:57 -0500

    I have 2 directories: `fine' and `big trouble'.
1) I do
        ls fine 'big trouble'
2) Now I set a variable
        my_dir='big trouble'
and I do
        ls fine "$my_dir"
Still fine.
3) I need to set one more variable
        what="fine \"$my_dir\""
and I try to do
        ls $what
but it DOESN'T WORK!
    I tried every form of quoting I could imagine, but in vain. PLEASE HELP!!!

P.S.1) I've found I can do
        set -- fine "$my_dir" ; ls "$@"
but it is very ugly and I don't use my variable _what_.(I've tried what="$@" 
and such, but ls $what still doesn't work. So frustrating!)
P.S.2) I've also found I can do
        what=(fine "$my_dir") ; ls "address@hidden"
That's better, but is it the only way? Do I HAVE TO use an array?


Sign-up for your own FREE Personalized E-mail at Mail.com

CareerBuilder.com has over 400,000 jobs. Be smarter about your job search

reply via email to

[Prev in Thread] Current Thread [Next in Thread]