Linux / UNIX Tech Support Forum
This is a discussion on echo command execute df and pipe output within the Shell scripting forums, part of the Development/Scripting category; when i type in this command : Code: echo " df -H | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{print $5 ...
|
|||||||
| Shell scripting You can discuss the shell scripting, request shell scripts and scripting techniques |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
when i type in this command :
Code:
echo " df -H | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{print $5 " "$1}' "
Code:
df -H | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{print }
how do i echo this command so the print variable will show? why are they missing. Last edited by nixcraft; 23-05-2009 at 03:55 PM. Reason: code tag added |
| Sponsored Links | ||
|
|
|
||||
|
Try
Code:
echo $(df -H | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{print $5 " "$1}')
Code:
df -H | grep -vE '^Filesystem|tmpfs|cdrom' | awk '{print $5 " "$1}'
Code:
var=$(command) echo "message $(command)" echo "Today is $(date)"
__________________
Vivek Gite Linux Evangelist Last edited by nixcraft; 23-05-2009 at 03:57 PM. |
|
|||
|
thanks - for security reasons, i dont have interent or email access at work - i echo >> my commands to a text files and transfer them via floppy disk (yes, floppy diskettes, the USB prorts are locked down).
|
![]() |
| Tags |
| command substitution , df command , echo , shell scripting |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| UNIX / Linux echo command examples | raj | Getting started tutorials | 8 | 15-11-2009 02:18 AM |
| echo command | gr8linux | Shell scripting | 9 | 19-05-2009 04:22 AM |
| save command and command output | savook | CentOS / RHEL / Fedora | 1 | 08-05-2009 05:33 PM |
| Execute UNIX Command / Shell Script Once In The Future | permalac | Shell scripting | 2 | 27-08-2008 08:13 PM |
| displaying the executed command then echo the status | warren | Shell scripting | 4 | 29-11-2006 01:56 AM |