Disable ads (and more) with a premium pass for a one time $4.99 payment
The command used for stream editing in Linux is sed. Sed, short for "stream editor", is specifically designed for parsing and transforming text from input streams and files. It applies various editing functions on lines of input and can perform tasks like text substitution, deletion, insertion, and other transformations in a scripted way. This makes it highly effective for bulk editing of files or streams of text.
While awk is also a powerful text processing tool, its primary use is for pattern scanning and processing rather than direct stream editing. Grep is used for searching for specific patterns in files or input streams and is not designed for editing text. Sort, on the other hand, organizes lines of text in a specified order but doesn’t modify the content itself beyond ordering. Thus, sed stands out as the dedicated tool for stream editing, making it the correct choice.