Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

In bash you would do

touch "foo bar"
rm "$(echo foo bar)"

How would you do that in fish?

This doesn't work for obvious reasons:

touch "foo bar"
rm "(echo foo bar)"
share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Seems that without the quotes produces the desired output:

touch "foo bar"
rm (echo foo bar)

A test:

echo "foo bar" > foo
touch "foo bar"
rm (cat foo)
share|improve this answer
    
How would you then do the reverse? touch foo bar; rm (echo foo bar) –  Tyilo Jun 20 '12 at 8:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.