- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- sed script
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
Discussions
Forums
Discussions
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
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
05-27-2002 12:36 PM
05-27-2002 12:36 PM
but I don't understand one of the sentences,
pls help me explain it, thanks in advance.
LOGFILE="$(sed -n -e"s#.8[ ]/#/#p" /f1)"
note f1:
#$Revision:
#configuration file
mail.debug /var/syslog/mail.log
*.info;mail.none /var/syslog/syslog.log
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2002 12:39 PM
05-27-2002 12:39 PM
Re: sed script
the sentence is
LOGFILE="$(sed -n -e"s#.*[ ]/#/#p" /f1)"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2002 01:39 PM
05-27-2002 01:39 PM
Solution#$Revision:
#configuration file
mail.debug /var/syslog/mail.log
*.info;mail.none /var/syslog/syslog.log
-->8---
LOGFILE="$(sed -n -e"s#.*[ ]/#/#p" /f1)"
read every line in file "/f1", but don't print. If and only if a substitution passes that can change all characters leading to a space followed by a slash, changed to a slash:
mail.debug /var/syslog/mail.log
will become
/var/syslog/mail.log
and
*.info;mail.none /var/syslog/syslog.log
will become
/var/syslog/syslog.log
# sed -n -e"s#.*[ ]/#/#p" /f1
/var/syslog/mail.log
/var/syslog/syslog.log
#
The output of the sed command will then be stored in the variable LOGFILE (this is POSIX shell syntax)
man sed would have helped I guess
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2002 07:41 AM
05-28-2002 07:41 AM
Re: sed script
I think Procura's explanation is clear enough. Yes, the man page also is very helpful.
Don't forget assign points to Procura.
3L
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2002 07:51 AM
05-28-2002 07:51 AM
Re: sed script
Thanks a lot