Jump to content

buffer a line into terminal and allow editing


Recommended Posts

All,

 

I am writing a script which will allow people to view a wide record in Unix. basically it takes in a file of 4000 ytes long and lets you view sections of the file, 1st 100 bytes and 20 lines and then using vi like commands l goes left k goes down etc etc.

 

All this works fine and i have a way of editing the line using awk and sed etc. what i need though is a way for a user to type in they want to edit line 60 at the current position, and then in the edit part of the terminal get the following:

 

line 60 Pos 34-134:

USERNAME textplacedhereforediting

 

Then from this they should be able to edit that line (the USER* one ) and the terminal would then lead read capture it and allow it to be saved. (again i hope this makes sense).

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...