LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-04-2009, 11:03 PM   #1
bazzano
LQ Newbie
 
Registered: Oct 2008
Posts: 9

Rep: Reputation: 0
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)}'`
 
Old 04-05-2009, 01:50 AM   #2
fozner
Member
 
Registered: Aug 2006
Posts: 147

Rep: Reputation: 16
Thumbs up 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.
 
Old 04-06-2009, 12:01 AM   #3
bazzano
LQ Newbie
 
Registered: Oct 2008
Posts: 9

Original Poster
Rep: Reputation: 0
great thanks
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I use grep inside awk? Helene Programming 10 09-29-2015 08:48 PM
Using grep and awk to get IP address snowman81 Programming 12 08-25-2012 10:45 AM
cat|grep|awk pudhiyavan Programming 6 07-14-2008 01:56 AM
Help with Bash (grep/awk/etc) piercey Programming 12 02-27-2008 10:21 AM
newbie needs help for grep and awk parker Programming 1 08-12-2003 04:24 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration