Mourning the loss of our friend, WhitPhil.
There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
 
Linux and Unix
Tag Cloud
access audio black screen blue screen boot bsod connection crash dell desktop driver drivers dvd email error excel firefox hard drive hardware internet keyboard laptop malware monitor motherboard network networking outlook problem processor ram recovery router safe mode screen slow sound spyware tdlwsp.dll trojan upgrade video virus vista vundo windows windows 7 windows vista windows xp wireless
Search
Search for:
Tech Support Guy Forums > Operating Systems > Linux and Unix >
vi

Tip: Click here to scan for System Errors and Optimize PC performance
[ Sponsored Link ]

Closed Thread
 
Thread Tools
WFKY9G's Avatar
Junior Member with 15 posts.
 
Join Date: Oct 2003
Location: DC
17-Dec-2003, 10:17 AM #1
Question vi
Has anyone created a script that will issue vi commands on a file? For example, I've written a script that redirects the output from a command to a log file, I now need to open this log file and edit with vi; add some explainations about what the log file says before returning it back to the screen.
codejockey's Avatar
Senior Member with 1,410 posts.
 
Join Date: Feb 2002
18-Dec-2003, 02:11 AM #2
I suspect you do not want to use vi for this purpose (and I'm not sure you can, even if you wanted to). Instead, consider using ed (precursor to vi, and still available from within vi). The ed command allows you to edit a file in place; you can use a "here document" within a shell script to perform the editing, which automates the process.

Hope this helps.
__________________
The slowest component still sits at the keyboard.
Closed Thread Bookmark and Share

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.

Smart Search

Find your solution!



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


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -5. The time now is 05:49 PM.
Copyright © 1996 - 2009 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.
Powered by Cermak Technologies, Inc.