From Fedora Project Wiki
Description
This test case ensures that the ed
command-line text editor works properly on Fedora.
Setup
- Ensure that you have
ed
installed. If not, install it:sudo dnf install ed
How to test
- Open a terminal.
- Create a new file and enter the
ed
editor:ed testfile.txt
- At the
ed
prompt, typea
to enter append mode. Then, type "This is a test file for ed.", and finish input with a single period.
on its own line. - Save the changes to the file:
w
- Exit
ed
:q
- Check the contents of the file:
cat testfile.txt
Expected Results
- The command
ed testfile.txt
starts theed
editor without any errors. - After entering text, saving, and exiting, the content of
testfile.txt
should be "This is a test file for ed.".
Optional
Explore more advanced features of ed
, such as deleting lines, searching for text, or replacing text.