Operating System - HP-UX
1752785
Members
6052
Online
108789
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
тАО12-12-2001 09:20 AM
тАО12-12-2001 09:20 AM
SED
I have a file that looks similar to the following:
server1_138476245,
server2_543989432,
server3_534242389,
Is there any way to manipulate this file to remove the ",". I suspect the 'sed' command could be used, but unfortunately I'm not too familiar with this utility.
Any help would be greatly appreciated.
Thanks!
-Matt
server1_138476245,
server2_543989432,
server3_534242389,
Is there any way to manipulate this file to remove the ",". I suspect the 'sed' command could be used, but unfortunately I'm not too familiar with this utility.
Any help would be greatly appreciated.
Thanks!
-Matt
- Tags:
- sed
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-12-2001 11:26 AM
тАО12-12-2001 11:26 AM
Re: SED
You can do ..
# cat | sed 's/,//g' >
# cat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-12-2001 11:29 AM
тАО12-12-2001 11:29 AM
Re: SED
or ..
# cat | tr "," "\000" >
The \000 is the null character.
# cat
The \000 is the null character.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-12-2001 03:28 PM
тАО12-12-2001 03:28 PM
Re: SED
Hello Matt,
if you would like to get rid of ALL commas, then it is enough to
tr -d "," < org-file > new-file
But if you only want to get rid of the trailing commas, you'll need something like
sed 's/,$//' < old-file > new-file
Just my $0.02,
Wodisch
if you would like to get rid of ALL commas, then it is enough to
tr -d "," < org-file > new-file
But if you only want to get rid of the trailing commas, you'll need something like
sed 's/,$//' < old-file > new-file
Just my $0.02,
Wodisch
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