LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   grep and awk error (https://www.linuxquestions.org/questions/programming-9/grep-and-awk-error-716927/)

bazzano 04-04-2009 11:03 PM

grep and awk error
 
Hey guys not sure why but when i execute the script i get the correct result but then it says command no found not sure why is there anything wrong with my code?

Code:


#!bin/sh


`quota -v | grep ^/home | awk '{print int($2/$3*100)}'`


fozner 04-05-2009 01:50 AM

back tics
 
Well, you should be glad that it returns command not found. You've got back tics ` ` around the `command` so the script tries to execute the text that comes back from it. Try without the ` characters.

bazzano 04-06-2009 12:01 AM

great thanks


All times are GMT -5. The time now is 04:49 AM.