Results 1 to 6 of 6
Within KNOPPIX 4.0 I have created 2 seperate files one file I want to edit using the ed inside the shell-Konsole window but where is it located? The other file ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-13-2007 #1Just Joined!
- Join Date
- Dec 2007
- Posts
- 2
New to KNOPPIX 4.0 Please help?
Within KNOPPIX 4.0 I have created 2 seperate files one file I want to edit using the ed inside the shell-Konsole window but where is it located? The other file I must edit using the vi editor how do I access that editor as well?
how do I Use an editor available in my Konsole window that is not the vi editor to edit a file. I was told to Try using the command-line text editor "ed" in the Shell - Konsole window. Where is this text editor "ed" located?
- 12-13-2007 #2forum.guy
- Join Date
- May 2004
- Location
- arch linux
- Posts
- 18,733
Welcome to the forums!
If you want to edit files outside of your /home directory, you'll need root permissions to do so. Just go to a terminal or konsole (look for it in your applications menu) and enter su, then enter your root password when it's requested.
Then you can use vi or ed to edit the files:
I've never used ed, but am guessing it starts the same way:Code:vi /path/to/file/
Here's a good website for learning the command line under Linux:Code:ed /path/to/file
http://www.linuxcommand.org
Enjoy the Linux experience!oz
- 12-13-2007 #3forum.guy
- Join Date
- May 2004
- Location
- arch linux
- Posts
- 18,733
In addition to that above, I think Knoppix gives the option to use sudo rather than su if you want to go that route. In that case, you'd skip on entering su in the terminal and just enter the word sudo before each command, something like this:
...enter user password when requested.Code:sudo vi /path/to/file/
oz
- 12-13-2007 #4Just Joined!
- Join Date
- Dec 2007
- Posts
- 2
Ozar for instance I have created two documents mollett.v1 and mollett.ed1 I have some text in both and I must edit using the "ed" editor and vi editor. The location of the two files is /mnt/sdb1/pos-420/Week2. From within the Week 2 directory I go to tools and click on open terminal if I wanted to edit the text in one of the files what do I have to do next. I am actually taking a UNIX course with University of Phoenix and I am missing something here we are in week 2 and I totally do not understand UNIX for the life of me.
This is the actual assignment I am working on currently
Knoppix Assignment 2
In your week2 directory create two identical files. Name one “yourlastname”.ed1 (e.g. miller.ed1) and the other “yourlastname”.vi (e.g. miller.vi). The contents of the two files should be:
There once was a man from Nantucket,
Who carried his lunch ina bucket,
Saih he with a sigh,
I am very full As he ate a whole pie,
Using an editor available in your Konsole window that is not the vi editor edit the *.ed1 file:
Add the following line after the last line:
If I just had a donut I’d dunk it.
Remove all text on the fourth line before the word As
Correct misspelled words ina and Saih
Save the file and exit the editor
Using the vi editor on the *.vi file
Add the following line after the last line:
If I just had a donut I’d dunk it.
Remove all text on the fourth line before the word As
Correct misspelled words ina and Saih
Change the limerick so it reflects a woman instead of a man (change all occurrences of man to woman, his to her, and he to she) using search and replace feature
Save the file and exit vi
Place the word count of the two files in a file called “yourlastname”.out (e.g. miller.out)
Change Nantucket to Pawtucket in the *.ed1 file using the sed command
Append the last two lines of each file to the file called “yourlastname”.out without cutting and pasting (Hint: tail command can do this)
Find the differences between the two files and append the result to the file called “yourlastname”.out (Hint: diff command can do this)
Use grep to find files contaning Pawtucket and append the output to the file called “yourlastname”.out
In your week2 directory create the script in Project.3-7 and name it “yourlastname”.3-7 (e.g. miller.3-7)
Attach your four files to a message posted in the Assignments NG
- 12-13-2007 #5
This is more of an scripting problem than a knoppix problem.
Other than that, read an ed tutorial on the web.
- 12-13-2007 #6forum.guy
- Join Date
- May 2004
- Location
- arch linux
- Posts
- 18,733
Sorry, Jason, but the forums rules prohibit the posting of homework questions:
http://www.linuxforums.org/forum/lin...ums-rules.html
However, I have already given you the procedure you'd need to use in order to edit text files.
If it still makes no sense to you, maybe you can consult with your instructor for additional advice.oz



