![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
AWK Help
This is my code
Code:
AVAIL=`df -k /opt/mysql | awk '{
TEMP=$5
pos=index(TEMP, "capacity" )
printf "position is %d\n",pos
printf "our new temp is %s\n",substr(TEMP,1,11)
AVAIL=substr(TEMP,1,11)
}'`
##blocks=`df -b /opt/mysql`
echo AVAIL is "$AVAIL"
Code:
AVAIL is position is 1 our new temp is capacity position is 0 our new temp is 17% |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|