- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Query on using VI and CAT
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
тАО01-14-2008 08:17 PM
тАО01-14-2008 08:17 PM
Query on using VI and CAT
I have some question on the use of VI, when I am using vi as a root and as the general user the number of columns per pages seems to differ, may I know why this is so?
Also if I use a cat and vi to view a file, the special character appears to be different, cat display correctly while vi display a different character. Is there something wrong with the configuration?
Best regards
Henry
- Tags:
- cat
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2008 08:41 PM
тАО01-14-2008 08:41 PM
Re: Query on using VI and CAT
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-14-2008 10:08 PM
тАО01-14-2008 10:08 PM
Re: Query on using VI and CAT
What is the character? cat(1) won't print unprintable chars depending on the locale.
What is your locale?
- Tags:
- unprintable chars
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2008 05:14 AM
тАО01-16-2008 05:14 AM
Re: Query on using VI and CAT
I have COLUMNS=80 and LINES=24
I bet root has different settings from the other user. It should be set in the user's (or root's) $HOME/.profile.
2. This is what I do when the environment looks different between user A and user B.
I log in as user A.
I run "env > userA.env"
I log in as user B.
I run "env > userB.env"
I log in as either user.
I run "vi /home/userA/userA.env /home/userB/userB.env"
I use :n to move from file userA.env to file userB.env.
I use :rewind to move back to looking at file userA.env.
Or you could just run the diff command on those two files. That seems a lot less complicated.
3. Sometimes there is a .exrc file in the user's home directory. This is a setup file for vi. It has a pile of map commands and set commands in it. Maybe there is a different here. To see all of the set options, go into vi and run ":set all".
I always have: "set showmode noai".
showmode: prints "INPUT MODE" when you are in input mode.
noai: lets me search for text regardless of case. So "/mystuff" and "/mYsTuff" would find the same text.
steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2008 01:13 PM
тАО01-16-2008 01:13 PM
Re: Query on using VI and CAT
I gave up on those glass terminal dimensions when I got a workstation. I use LINES=36. :-)
The proper way to set the dimensions is:
$ eval $(resize) # for a real shell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО01-16-2008 01:17 PM
тАО01-16-2008 01:17 PM
Re: Query on using VI and CAT
steve