Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

Your Answer


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.