- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Problem assigning a command alias
Operating System - HP-UX
1760992
Members
12210
Online
108896
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2006 05:44 AM
тАО09-21-2006 05:44 AM
Problem assigning a command alias
I am tring to make and alias called "dfp" for the following command:
df | awk '{printf("%-25s %4s %-20s \n",$1,$4,$7);}'
If I try:
alias dfp=df | awk '{printf("%-25s %4s %-20s \n",$1,$4,$7);}'
it takes it, but when I type dfp, I get an error in the awk part:
"Usage: awk [-F Character][-v Variable=Value][-f File|Commands][Variable=Value|File ...]"
I've tried other variations of quoting and receive errors with each attemp. Any of you Guru's want to take a stab at this?
df | awk '{printf("%-25s %4s %-20s \n",$1,$4,$7);}'
If I try:
alias dfp=df | awk '{printf("%-25s %4s %-20s \n",$1,$4,$7);}'
it takes it, but when I type dfp, I get an error in the awk part:
"Usage: awk [-F Character][-v Variable=Value][-f File|Commands][Variable=Value|File ...]"
I've tried other variations of quoting and receive errors with each attemp. Any of you Guru's want to take a stab at this?
Where wisdom is called for, force is of little use. --Of course, a hammer does wonders for relieving stress.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2006 05:49 AM
тАО09-21-2006 05:49 AM
Re: Problem assigning a command alias
you forgot single tick for entire command.
It should be like this:
alias dfp='df | awk '{printf("%-25s %4s %-20s \n",$1,$4,$7);}''
It should be like this:
alias dfp='df | awk '{printf("%-25s %4s %-20s \n",$1,$4,$7);}''
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2006 05:50 AM
тАО09-21-2006 05:50 AM
Re: Problem assigning a command alias
Disregard this post.
Where wisdom is called for, force is of little use. --Of course, a hammer does wonders for relieving stress.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-21-2006 05:57 AM
тАО09-21-2006 05:57 AM
Re: Problem assigning a command alias
@IT_2007
I'm such a bonehead! I'm running dsh, a distributed shell where I can run commands across many systems at once.
I thought I was on all HP servers, but one was AIX. The command was, of course, not running on the AIX server.
Sorry!
I'm such a bonehead! I'm running dsh, a distributed shell where I can run commands across many systems at once.
I thought I was on all HP servers, but one was AIX. The command was, of course, not running on the AIX server.
Sorry!
Where wisdom is called for, force is of little use. --Of course, a hammer does wonders for relieving stress.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP