There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
Search
Tag Cloud
acer asus batch bios bsod computer crash driver drivers error ethernet excel freeze gaming gpu hard drive hardware hdmi internet laptop malware memory missing monitor motherboard mouse network printer problem ram random registry repair router security slow software sound trojan 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

Reply  
Thread Tools
WFKY9G's Avatar
Junior Member with 15 posts.
 
Join Date: Oct 2003
Location: DC
17-Dec-2003, 11: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, 03: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.
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 10:46 AM.
Copyright © 1996 - 2011 TechGuy, Inc. All rights reserved.

Powered by Cermak Technologies, Inc.