![]() |
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 |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to use cvs export remotely | jasongr | Shell Programming and Scripting | 2 | 11-27-2005 08:41 PM |
| if statement remotely | dxrmroue | Shell Programming and Scripting | 1 | 10-22-2004 11:28 AM |
| Using CD drive remotely ! | nikk | UNIX for Advanced & Expert Users | 6 | 02-19-2002 03:03 AM |
| Having PROM Env remotely ! | nikk | UNIX for Advanced & Expert Users | 1 | 11-11-2001 03:19 PM |
| Remotely login to one from another? | Kagor | UNIX for Dummies Questions & Answers | 2 | 01-17-2001 06:39 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
using awk remotely
Hi there
I am trying to add up the disk space used on a remote linux box but am falling at the first hurdle i.e isolating the 'space used' column with df -k on the remote box if i run this, i get the df -k output as expected Code:
# rsh remote-server 'df -k|grep sd|grep -v boot' /dev/sda3 8254272 1672956 6162020 22% / /dev/sdb4 140258988 13405152 119729012 11% /data /dev/sda4 123648020 32828 117334180 1% /data1 so i tried Code:
# rsh remote-server 'df -k|grep sd|grep -v boot|awk {print $3} '
awk: cmd. line:2: (END OF FILE)
awk: cmd. line:2: parse error
does anybody have any idea how i can get around this ? any help would be great |
|
||||
|
I tried the double quote option and I got this
Code:
# rsh remote-server "df -k | grep sd | grep -v boot | awk '{print $3}'"
/dev/sda3 8254272 1672772 6162204 22% /
/dev/sdb4 140258988 12922912 120211252 10% /data_store
/dev/sda4 123648020 32828 117334180 1% /data_store1
Quote:
unfortunately I got this Code:
# rsh remote-server <<'EOF'
> df -k | awk '/sd/ && !/boot/ { print $3 }'
> EOF
tcgetattr: Inappropriate ioctl for device
ioctl I_FIND ttcompat: Inappropriate ioctl for device
any other suggestions ? Last edited by hcclnoodles; 10-13-2008 at 05:21 AM.. |
|
||||
|
Quote:
now i just need to find a way of adding them up, thanks again for all your help guys |
| Sponsored Links | ||
|
|
![]() |
| Bookmarks |
| Tags |
| inappropriate ioctl for device |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|