The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 03-18-2008
era
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
Backslash works for me here. Are you using some atrocious c shell?

Code:
vnix$ echo "      swremove \`swlist -l product | grep someproduct| awk '{print \$1}'\` "
      swremove `swlist -l product | grep someproduct| awk '{print $1}'`

vnix$
... Or by "in the make file" you mean this is in a makefile? Then you also need to double the dollar sign (but then also the output would be different than what you are reporting).

Code:
vnix$ cat Makefile
fun:
	echo "      swremove \`swlist -l product | grep someproduct| awk '{print \$$1}'\` "

vnix$ make
echo "      swremove \`swlist -l product | grep someproduct| awk '{print \$1}'\` "
      swremove `swlist -l product | grep someproduct| awk '{print $1}'`

Last edited by era; 03-18-2008 at 03:02 AM.. Reason: Add Makefile snippet