- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: what does "-eeof $*" mean ?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
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
Discussion Boards
Community
Resources
Forums
Blogs
- 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-09-2002 11:50 AM
09-09-2002 11:50 AM
what does "-eeof $*" mean ?
I am working with some cnr dhcp scripts. And we are writting scripts to access the nrcmd though a command line.I am trying to understand how this scripting works.
The follwing is a script called cnrque.
nrcmd -C localhost -N username -P password -r<<-eeof
$*
eeof
I undersand most of it that we are accessing the nrcmd though the localhost with the username after the -N and the password after the -P with read only access.
But I dont dont really understand what the last part means.
<<-eeof
$*
eeof
It is some kind of redirection from the command line because
./cnrque dhcp gethealth
gets me the health of the dhcp server.
So I understand that the eeof is feeding the dhcp gethealth though the script.
I just want more information about it what is it actully doing and what do the $* mean. And mabe some other scripting examples of this.
thanks
~ Richard
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2002 11:51 AM
09-09-2002 11:51 AM
Re: what does "-eeof $*" mean ?
This is a "here-document" where the command line parameters are being expanded before they are fed into the program via standard input. The - ahead of eeof allows for indenting to be ignored.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2002 11:55 AM
09-09-2002 11:55 AM
Re: what does "-eeof $*" mean ?
Actually, that sounds a bit vague. Do this:
man sh-posix
and search ahead for here-doc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2002 11:55 AM
09-09-2002 11:55 AM
Re: what does "-eeof $*" mean ?
Note that the - does allow indenting WITH TABS ONLY; not spaces.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2002 11:56 AM
09-09-2002 11:56 AM
Re: what does "-eeof $*" mean ?
Should read:
The command (i.e. command line arguments in this case) are applied to the invoked program.
Note that the "-" does allow indenting WITH TABS ONLY; not spaces.
Sorry :(
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2002 12:12 PM
09-09-2002 12:12 PM
Re: what does "-eeof $*" mean ?
cat <<- EOF #deletes leading TABs, quits at EOF
Dear $name,
I am writing this on $(date).
blah blah
EOF
If you use << instead of <<-, then leading TABs will be preserved. That would allow you to keep any indents you applied to the text.
Note that EOF (or whatever pattern you pick) needs to start at the start of the line, and be alone on the line. So using
asdf EOF adf
will NOT stop the cat. You need EOF alone:
EOF
Tom