HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- replace ^I caracter in ascii file?
Operating System - HP-UX
1834397
Members
2749
Online
110067
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
Discussions
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
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
04-15-2005 10:29 AM
04-15-2005 10:29 AM
Hi,
Whit the VI editor, in an ASCII file, as I can replace the character ^I by blank ?
Thanks
Jorge Prado
Whit the VI editor, in an ASCII file, as I can replace the character ^I by blank ?
Thanks
Jorge Prado
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2005 01:00 PM
04-15-2005 01:00 PM
Solution
^I (or CTRL-I) is actually the tab character, so you have lots of choices. The default vi behavior is to treat each tab as white space and to let the terminal move the cursor to the next tab stop (every 8 characters by default). To see special characters in vi, type the command:
:set list
and turn off this special character display,
:set nolist
One way to change all tabs to a single space:
:%s/\TAB/ /g
where the word TAB is really the tab key. The commands are:
: =invoke ed line editor
% =shortcut for 1,$ (all lines in file)
s =string replacement command
/ =beginning of pattern to match
\ =escape the next character's special meaning
TAB =the tab character
/ =end of source pattern, begin replacement pattern
=space character
/ =end of replacement pattern
g =repeat as needed across each line
Or you can convert the file instantly into the implied meaning of tabs (without vi) by using the expand command:
expand my_file > my_new_file
Now everything will line up correctly.
Bill Hassell, sysadmin
:set list
and turn off this special character display,
:set nolist
One way to change all tabs to a single space:
:%s/\TAB/ /g
where the word TAB is really the tab key. The commands are:
: =invoke ed line editor
% =shortcut for 1,$ (all lines in file)
s =string replacement command
/ =beginning of pattern to match
\ =escape the next character's special meaning
TAB =the tab character
/ =end of source pattern, begin replacement pattern
=space character
/ =end of replacement pattern
g =repeat as needed across each line
Or you can convert the file instantly into the implied meaning of tabs (without vi) by using the expand command:
expand my_file > my_new_file
Now everything will line up correctly.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2005 11:18 PM
04-17-2005 11:18 PM
Re: replace ^I caracter in ascii file?
You can use cntl-V to set a cntl character.
So you could do:
:1,$:s/cntl-Vcntl-I/ /g
So you could do:
:1,$:s/cntl-Vcntl-I/ /g
"Well, actually, she is a rocket scientist" -- Steve Martin in "Roxanne"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2005 11:40 PM
04-17-2005 11:40 PM
Re: replace ^I caracter in ascii file?
1,$s/cntl-Vcntl-l//g
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 2025 Hewlett Packard Enterprise Development LP