On 7/13/2008 10:43 AM, William L. Maltby wrote:
On Sun, 2008-07-13 at 11:21 -0500, Johnny Hughes wrote:
OR ...

yum remove `cat result`

The winner! And if running a modern bash

  yum remove $(cat result)


Interesting. According to the bash man page `command` and $(command) are slightly different (in regards to backslashes). I always assumed they were identical in every way.

========================
Command Substitution

Command substitution allows the output of a command to replace the command name. There are two forms:

      $(command)
   or
      ‘command‘

Bash performs the expansion by executing command and replacing the command substitution with the standard output of the command, with any trailing newlines deleted.

...

*When the old-style backquote form of substitution is used, backslash retains its literal meaning except when followed by $, ‘, or \.* The first backquote not preceded by a backslash terminates the command substitution. When using the $(command) form, all characters between the parentheses make up the command; none are treated specially.
========================


Kenneth
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Reply via email to