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 -->
  #4 (permalink)  
Old 11-21-2008
illcar illcar is offline
Registered User
  
 

Join Date: Nov 2008
Posts: 9
I am sorry, I am still having issues. I changed the code as follows:

Code:
 
myMethod
used=`myMethod | awk '{gsub(/,/,""); print $3}'`
echo $used
Now I get a different error. If it is not clear what could be wrong, any pointers for debugging awk would be appreciated.

Code:
 
bash-3.00# ./test.sh 
sum                 1,977,920      795,648    1,182,272
awk: syntax error near line 1
awk: illegal statement near line 1
bash-3.00# stty: : I/O error
The first line of the script is:
Code:
 
#!/bin/sh