Live Chat & Podcast at 1:00PM Eastern on Sunday!
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Tag Cloud
access acer asus bios bsod computer crash desktop driver drivers error ethernet excel freeze gaming hard drive hardware hdmi internet laptop malware memory missing monitor motherboard network printer problem ram registry router security slow software sound svchost.exe trojan ubuntu 11.10 uninstall usb video virus vista wifi windows windows 7 windows 7 32 bit windows 7 64 bit windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
VI editor help

Reply  
Thread Tools
prepare's Avatar
Junior Member with 1 posts.
 
Join Date: Mar 2004
14-Mar-2004, 08:10 PM #1
VI editor help
Hi guys,

im trying to learn how to use Linux and the VI editor. I have book im trying to go through doing practice questions etc to learn commands but im stuck on a few

one of the questions is
I want to search for the character ^M (RETURN) just before the end of any line how do i search for this? and how could i delete all such patterns in your vi buffer with one global replace command?

and How would I go about changing all instances of multiple consecutive spaces to a single space?

any help would be appreciated,

thanks

Andrew
Squashman's Avatar
Trusted Advisor with 18,706 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
Experience: Bocks of Rox
16-Mar-2004, 11:05 AM #2
I know how to do it using SED or TR but not sure how to do it within VI.

I thought the ^ meant the beginning of a line and the $ was the end of a line.

If you want to search for something you need to be in command mode first. So hit the esc key twice for good measure. Then type /^
Reply

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who want to help you solve your computer problems. See our Welcome Guide to get started.
Thread Tools



Facebook Facebook Twitter Twitter TechGuy.tv TechGuy.tv Mobile TSG Mobile
You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 06:23 PM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.