HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- sed and a script file (-f script_file)
Operating System - HP-UX
1829115
Members
13443
Online
109986
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
Forums
Discussions
Discussions
Discussions
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
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
06-16-2004 07:17 AM
06-16-2004 07:17 AM
I would like to use sed and "-f script_file" or " -e script"
I am currently using sed to do changes and like using it but since I have a lot of changes that are needed I thought of using
a -f or the -e option.
small sample:
sed "s/Cap: /CAPACITY /" old.sch > new.sch
sed "s/Trial /TRIAL /" new.sch > new1.sch
Steve
I am currently using sed to do changes and like using it but since I have a lot of changes that are needed I thought of using
a -f or the -e option.
small sample:
sed "s/Cap: /CAPACITY /" old.sch > new.sch
sed "s/Trial /TRIAL /" new.sch > new1.sch
Steve
Not as is, is now
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2004 07:28 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-16-2004 07:30 AM
06-16-2004 07:30 AM
Re: sed and a script file (-f script_file)
Sounds like a plan. Simply combine each of your instructions in a single file and use the -f option to identify your script file. This will be much more efficient than applying one rule at a time. Be aware that the commands are processed sequentially so that, for example, if you have an instruction
that substitues "cat" for "dog" and a subsequent instruction that substitutes "cow" for "cat" then all of your dogs as well as your cats will become cows whether that was your intention or not.
that substitues "cat" for "dog" and a subsequent instruction that substitutes "cow" for "cat" then all of your dogs as well as your cats will become cows whether that was your intention or not.
If it ain't broke, I can fix that.
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.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP