Search Results

Search: Posts Made By: KevinGod
2,843
Posted By KevinGod
Found solution
x=`df -k $fs |sed -n "2 p"| awk '{ print $4 }'| sed 's/%//'`


not probally best practice but it works...thanks
2,843
Posted By KevinGod
Nope don't
Thanks for responce...

df -k $fs | awk '{ if(NR==2){print substr($4,length($4)-2,length($4)-1)}}'`

nope both your suggestions don't work come back to a >
2,843
Posted By KevinGod
Remove % from a variable
I have the following sh file which I originally wrote for HP Unix(which worked great)... but df is different in AIX (HP doesn't have a % in df -k), So I need to remove the % for $x at the moment I'm...
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 02:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy