- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: insert spaces in a word
Operating System - Linux
1748255
Members
4154
Online
108760
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
тАО03-07-2008 10:56 PM
тАО03-07-2008 10:56 PM
insert spaces in a word
Hello,
This is the string what i have which is continous.
/dev/dsk/c3t2d0s3/dev/rdsk/c3t2d0s3
now which command i need to use to get the string as below.
/dev/dsk/c3t2d0s3 /dev/rdsk/c3t2d0s3
This is the string what i have which is continous.
/dev/dsk/c3t2d0s3/dev/rdsk/c3t2d0s3
now which command i need to use to get the string as below.
/dev/dsk/c3t2d0s3 /dev/rdsk/c3t2d0s3
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-07-2008 11:01 PM
тАО03-07-2008 11:01 PM
Re: insert spaces in a word
hi,
try:
:1,$s/\/dev/ \/dev/g
kind regards
yogeeraj
try:
:1,$s/\/dev/ \/dev/g
kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-07-2008 11:06 PM
тАО03-07-2008 11:06 PM
Re: insert spaces in a word
hi again,
of course, i was assuming that you are using the vi editor.
You can also do the same from the command line.
cat oldfile | sed s/\/dev/ \/dev/g> newfile
hope this helps too!
kind regards
yogeeraj
of course, i was assuming that you are using the vi editor.
You can also do the same from the command line.
cat oldfile | sed s/\/dev/ \/dev/g> newfile
hope this helps too!
kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
- Tags:
- sed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-08-2008 10:05 AM
тАО03-08-2008 10:05 AM
Re: insert spaces in a word
Similar answer as the other question you asked:
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1210912
Where did that string come from, where is it going?
What is the 'real' problem you are trying to solve.
Rather then fixing after the fact exploiting
assumed characteritics which may or might not change, why not solve the core problem and make sure clean data is delivered in the first place?!
For example, witness the following (contrived) example:
$ perl -e 'print join q( ),@ARGV' /dev/*/c0t0d0
$ perl -le 'print @ARGV' /dev/*/c0t0d0
/dev/dsk/c0t0d0/dev/rdsk/c0t0d0
$ perl -le 'print join q( ),@ARGV' /dev/*/c0t0d0
/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0
Hope this helps,
Hein.
http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1210912
Where did that string come from, where is it going?
What is the 'real' problem you are trying to solve.
Rather then fixing after the fact exploiting
assumed characteritics which may or might not change, why not solve the core problem and make sure clean data is delivered in the first place?!
For example, witness the following (contrived) example:
$ perl -e 'print join q( ),@ARGV' /dev/*/c0t0d0
$ perl -le 'print @ARGV' /dev/*/c0t0d0
/dev/dsk/c0t0d0/dev/rdsk/c0t0d0
$ perl -le 'print join q( ),@ARGV' /dev/*/c0t0d0
/dev/dsk/c0t0d0 /dev/rdsk/c0t0d0
Hope this helps,
Hein.
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