- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Scripting:Pls help.
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-22-2004 03:29 PM
05-22-2004 03:29 PM
Pls help. How can we exclude an empty space on a file, so the script won't read the empty space. Example, I have a file called file01 below :
one
two
#tree
four
five
If in the script I use this command #grep -v "#" file01|while read X, the empty space will be read by the script and give me the wrong result. How can we exclude the empty space on the command #grep -v "#" file01|while read X
Pls help.
Thanks in advance.
Best Regards,
Negara
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2004 04:10 PM
05-22-2004 04:10 PM
Re: Scripting:Pls help.
grep -v " " or grep -v " "
etc.
Go for it. Best of luck.
There a multitude of ways to do this. I am just giving you a down and dirty quick fix.
Regards,
dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2004 04:26 PM
05-22-2004 04:26 PM
Re: Scripting:Pls help.
My second grep should have shown multiple spaces between the quotes. Don't know why it did not.
May be a forums issue for Dan.
dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2004 04:32 PM
05-22-2004 04:32 PM
Re: Scripting:Pls help.
Thanks. It still not working properly.
Can you pls help to give me other methods?
Thanks.
Negara
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2004 04:57 PM
05-22-2004 04:57 PM
Re: Scripting:Pls help.
while read X
this will strip out empty lines and lines begining with #
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2004 05:00 PM
05-22-2004 05:00 PM
Re: Scripting:Pls help.
while read X
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2004 05:11 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2004 02:02 PM
05-23-2004 02:02 PM
Re: Scripting:Pls help.
(also available second hand )
Also u can use the web. Check out:
http://www.uwsg.iu.edu/UAU/advcomm/SED.html
Please Assign points.
Isaac.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-23-2004 03:21 PM
05-23-2004 03:21 PM
Re: Scripting:Pls help.
It looks fine for me now.
Thanks again.
Best Regards,
Negara