GreenLake Administration
Operating System - HP-UX
1847817
Members
4841
Online
104021
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
Forums
Discussions
back
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
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.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP