-   Linux - Newbie (
-   -   how to use one commands output (

vkmgeek 09-13-2007 10:36 AM

how to use one commands output

#root#] ls `cut -d " " -f 1 temp.txt`
this commands works properly for me (I am getting one file name as an output which is required)...The output from cut command will be replaced after ls. Please correct if I am worng.

Now, the below command is not working for me; though they are similar.

#root#]grep "temp" `ls `cut -d " " -f 1 temp.txt``

Logically, I shud get some output from ls and this shud act as file name for grep command. But this is not working...

Please help

raskin 09-13-2007 01:46 PM

You tried to nest ``, but opening and closing ticks are identical. Read man bash and use $() - they can be nested.

lord-fu 09-13-2007 01:46 PM

Removed raskin owned the answer.

vkmgeek 09-15-2007 11:04 AM

hey thanks !!!

All times are GMT -5. The time now is 11:09 PM.