Dictionary entry
sed
Last updated
Meanings
proper nounpropercomputing
A non-interactive command-line text editor used mainly for automatic, scripted changes to files or streams of text.
Grammar: Usually written in lowercase and treated as a tool name; no article is used.
Patterns
- use sed to do something
- sed script
- run sed on a file
She used sed to replace every occurrence of 'color' with 'colour' in the document.
The build script calls sed to strip comments from the configuration file.
If you need to edit thousands of files the same way, sed is much faster than opening each one.
verbtransitivecomputinginformal
To edit text with the sed program, especially by applying a pattern-based substitution.
Grammar: Takes an object: sed the file. Often used in the pattern 'sed something into something'.
Patterns
- sed a file
- sed something into something
He sedded the log to remove timestamps before sharing it.
You can sed the output into a cleaner format with a single command.
Common combinations
- sed command
- The sed command on this system supports extended regular expressions.
- sed script
- Write a small sed script to rename all the variables at once.
- sed -i
- Using sed -i edits the file in place, so keep a backup.
- sed substitution
- A sed substitution uses the letter s followed by the pattern to find and the replacement.
Synonyms and how they differ
- awk
- Another command-line text-processing tool, but it is better for field-based and arithmetic work, while sed is narrower and faster for simple substitutions.
- perl
- A general-purpose programming language often used for the same kind of one-line text edits, but it is heavier than sed for small jobs.
Commonly confused: sed or said?
sed vs said
These sound similar, but 'said' is the past tense of 'say', while 'sed' is a computing tool name.
Practice
Which sentence uses 'sed' correctly as a computing term?
Choose one answer.
'Sed' is a text-editing tool, so it fits the context of deleting lines in a file. The other options use 'sed' as if it were a verb meaning 'sent', a noun for a vehicle, or an adjective for a feeling, none of which are standard English.
Make it your own
Write a sentence using “sed”, then check it and compare it with the examples above.