- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- vi editor
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
Discussions
Discussions
Forums
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
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
тАО03-04-2004 08:18 PM
тАО03-04-2004 08:18 PM
i try to substitute disk01 with disk02 for all occurence in my file
command :% s/disk01/disk02/g
It's this command ok?
the vi return me:
unknow command character ' '
Thank!!
Solved! Go to Solution.
- Tags:
- vi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2004 08:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2004 08:21 PM
тАО03-04-2004 08:21 PM
Re: vi editor
There are several possibles. mine is:
:g/disk01/s//disk02/g
the g stands for global so multiple times on all lines.
HTH,
Gideon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2004 08:22 PM
тАО03-04-2004 08:22 PM
Re: vi editor
the command is OK, but DON'T leave a blank between the "%" and the "s".
good luck,
Thierry.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2004 08:22 PM
тАО03-04-2004 08:22 PM
Re: vi editor
sks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2004 08:23 PM
тАО03-04-2004 08:23 PM
Re: vi editor
I'm no sed expert, so I'm not sure of the syntax. I think this would be a long-winded change using vi. Have a look at the sed man page for the appropriate syntax.
Mark Syder (like the drink but spelt different)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2004 08:23 PM
тАО03-04-2004 08:23 PM
Re: vi editor
http://chris.tobkin.com/~tobkin/vi/
Is good
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2004 08:26 PM
тАО03-04-2004 08:26 PM
Re: vi editor
sed sollution:
cat file | sed 's/disk01/disk02/g'>>file2
mv file2 file
Regards,
Gideon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2004 08:28 PM
тАО03-04-2004 08:28 PM
Re: vi editor
: s/disk01/disk02/gc
Instead use
:1,$ s/disk01/disk02/gc
sks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-04-2004 08:34 PM
тАО03-04-2004 08:34 PM
Re: vi editor
Sorry, I can't give you any points - it's not my thread!
Mark