# Source attribution - [replace a unknown string between two known strings with sed](https://stackoverflow.com/questions/10613643/replace-a-unknown-string-between-two-known-strings-with-sed) — question: Camden S.; accepted answer: vyegorov (answer 10613688). - [sed: Replace part of a line](https://stackoverflow.com/questions/1074450/sed-replace-part-of-a-line) — question: calvinkrishy; accepted answer: Jeremy Stein (answer 1074533). - [How to insert a new line character after a fixed number of characters in a file](https://stackoverflow.com/questions/1187078/how-to-insert-a-new-line-character-after-a-fixed-number-of-characters-in-a-file) — question: rangalo; accepted answer: Kristian (answer 1187225). - [excluding first and last lines from sed /START/,/END/](https://stackoverflow.com/questions/1187354/excluding-first-and-last-lines-from-sed-start-end) — question: Chen Levy; accepted answer: Ville Laurikari (answer 1187517). - [Replace only if string exists in current line](https://stackoverflow.com/questions/11958369/replace-only-if-string-exists-in-current-line) — question: Anders Lind; accepted answer: Ihor Kaharlichenko (answer 11958566). - [How to replace a path with another path in sed?](https://stackoverflow.com/questions/12061410/how-to-replace-a-path-with-another-path-in-sed) — question: Brian Postow; accepted answer: Lev Levitsky (answer 12061491). - [Remove all text before colon](https://stackoverflow.com/questions/12297859/remove-all-text-before-colon) — question: NewUsr_stat; accepted answer: Sacha Epskamp (answer 12297934). - [Extract numbers from a string using sed and regular expressions](https://stackoverflow.com/questions/12974162/extract-numbers-from-a-string-using-sed-and-regular-expressions) — question: Steven; accepted answer: Kent (answer 12974208). - [Insert lines in a file starting from a specific line](https://stackoverflow.com/questions/13316437/insert-lines-in-a-file-starting-from-a-specific-line) — question: Sadiel; accepted answer: Chris Seymour (answer 13316554). - [How to replace space with comma using sed?](https://stackoverflow.com/questions/13538772/how-to-replace-space-with-comma-using-sed) — question: Teja; accepted answer: mvp (answer 13538795). - [How can I prepend a string to the beginning of each line in a file?](https://stackoverflow.com/questions/13586349/how-can-i-prepend-a-string-to-the-beginning-of-each-line-in-a-file) — question: bobbyrne01; accepted answer: nullrevolution (answer 13587466). - [Regular Expression in sed for multiple replacements in one statement](https://stackoverflow.com/questions/14135027/regular-expression-in-sed-for-multiple-replacements-in-one-statement) — question: Jan; accepted answer: Anders Johansson (answer 14135068). - [Using sed to replace beginning of line when match found](https://stackoverflow.com/questions/14137353/using-sed-to-replace-beginning-of-line-when-match-found) — question: dublintech; accepted answer: Chris Seymour (answer 14137448). - [How to remove a character at the end of each line in UNIX](https://stackoverflow.com/questions/14840953/how-to-remove-a-character-at-the-end-of-each-line-in-unix) — question: Teja; accepted answer: jlliagre (answer 14840982). - [How do I pair every two lines of a text file with Bash?](https://stackoverflow.com/questions/1513861/how-do-i-pair-every-two-lines-of-a-text-file-with-bash) — question: fwaechter; accepted answer: Tim (answer 1513918). - [Uppercasing First Letter of Words Using SED](https://stackoverflow.com/questions/1538676/uppercasing-first-letter-of-words-using-sed) — question: neversaint; accepted answer: tangens (answer 1538818). - [Replace all double quotes with single quotes](https://stackoverflow.com/questions/16154007/replace-all-double-quotes-with-single-quotes) — question: Zounadire; accepted answer: user142162 (answer 16154029). - [Insert contents of a file after specific pattern match](https://stackoverflow.com/questions/16715373/insert-contents-of-a-file-after-specific-pattern-match) — question: Satish; accepted answer: Birei (answer 16715488). - [how to use sed, awk, or gawk to print only what is matched?](https://stackoverflow.com/questions/1733692/how-to-use-sed-awk-or-gawk-to-print-only-what-is-matched) — question: Stéphane; accepted answer: mouviciel (answer 1733727). - [Remove all lines before a match with sed](https://stackoverflow.com/questions/17364951/remove-all-lines-before-a-match-with-sed) — question: Fabio; accepted answer: Endoro (answer 17365103). - [Delete using a different delimiter with Sed](https://stackoverflow.com/questions/1797906/delete-using-a-different-delimiter-with-sed) — question: calvinkrishy; accepted answer: Stobor (answer 1797967). - [sed - Commenting a line matching a specific string AND that is not already commented out](https://stackoverflow.com/questions/17998763/sed-commenting-a-line-matching-a-specific-string-and-that-is-not-already-comme) — question: Jean-Francois Chevrette; accepted answer: aragaer (answer 17999003). - ['grep +A': print everything after a match](https://stackoverflow.com/questions/18166552/grep-a-print-everything-after-a-match) — question: B.Mr.W.; accepted answer: Hai Vu (answer 18166628). - [Using sed to split a string with a delimiter](https://stackoverflow.com/questions/18234378/using-sed-to-split-a-string-with-a-delimiter) — question: nullByteMe; accepted answer: fedorqui (answer 18234407). - [How to cut a string after a specific character in unix](https://stackoverflow.com/questions/18397698/how-to-cut-a-string-after-a-specific-character-in-unix) — question: canecse; accepted answer: falsetru (answer 18397722). - [Replace all whitespace with a line break/paragraph mark to make a word list](https://stackoverflow.com/questions/1853009/replace-all-whitespace-with-a-line-break-paragraph-mark-to-make-a-word-list) — question: DavidR; accepted answer: Greg Bacon (answer 1853040). - [find matching text and replace next line](https://stackoverflow.com/questions/18620153/find-matching-text-and-replace-next-line) — question: bswinnerton; accepted answer: potong (answer 18622953). - [Return a regex match in a Bash script, instead of replacing it](https://stackoverflow.com/questions/1898553/return-a-regex-match-in-a-bash-script-instead-of-replacing-it) — question: Mint; accepted answer: Dennis Williamson (answer 1898578). - [remove white space from the end of line in linux](https://stackoverflow.com/questions/20521857/remove-white-space-from-the-end-of-line-in-linux) — question: aksg24; accepted answer: fedorqui (answer 20521915). - [Concatenate in bash the output of two commands without newline character](https://stackoverflow.com/questions/20871534/concatenate-in-bash-the-output-of-two-commands-without-newline-character) — question: synaptik; accepted answer: anubhava (answer 20871567). - [how can I get sed to quit after the first matching address range?](https://stackoverflow.com/questions/20943025/how-can-i-get-sed-to-quit-after-the-first-matching-address-range) — question: PonyEars; accepted answer: janos (answer 20943542). - [Remove odd or even lines from a text file](https://stackoverflow.com/questions/21309020/remove-odd-or-even-lines-from-a-text-file) — question: SamuelNLP; accepted answer: Thor (answer 21309073). - [Using sed to delete a case insensitive matched line](https://stackoverflow.com/questions/2157288/using-sed-to-delete-a-case-insensitive-matched-line) — question: eruina; accepted answer: Mark Byers (answer 2157363). - [Insert multiple lines into a file after specified pattern using shell script](https://stackoverflow.com/questions/22497246/insert-multiple-lines-into-a-file-after-specified-pattern-using-shell-script) — question: user27; accepted answer: sat (answer 22497499). - [How to remove leading whitespace from each line in a file](https://stackoverflow.com/questions/2310605/how-to-remove-leading-whitespace-from-each-line-in-a-file) — question: Lazer; accepted answer: shuvalov (answer 2310620). - [Why does sed require 3 backslashes for a regular backslash?](https://stackoverflow.com/questions/2369314/why-does-sed-require-3-backslashes-for-a-regular-backslash) — question: Geo; accepted answer: Dennis Williamson (answer 2372693). - [How to add a # before any line containing a matching pattern in BASH?](https://stackoverflow.com/questions/24230117/how-to-add-a-before-any-line-containing-a-matching-pattern-in-bash) — question: Village; accepted answer: potong (answer 24233771). - [How to UNCOMMENT a line that contains a specific string using Sed?](https://stackoverflow.com/questions/24889346/how-to-uncomment-a-line-that-contains-a-specific-string-using-sed) — question: user3864928; accepted answer: Avinash Raj (answer 24889374). - [How to remove every other line with sed?](https://stackoverflow.com/questions/2560411/how-to-remove-every-other-line-with-sed) — question: hhh; accepted answer: ghostdog74 (answer 2560448). - [BSD sed: extra characters at the end of d command](https://stackoverflow.com/questions/26081375/bsd-sed-extra-characters-at-the-end-of-d-command) — question: lutaoact; accepted answer: Jonathan Leffler (answer 26081763). - [Parsing the first column of a csv file to a new file](https://stackoverflow.com/questions/2652494/parsing-the-first-column-of-a-csv-file-to-a-new-file) — question: S1syphus; accepted answer: Thomas (answer 2652526). - [How can I remove the last (non-newline) character of a file in unix?](https://stackoverflow.com/questions/27305177/how-can-i-remove-the-last-non-newline-character-of-a-file-in-unix) — question: MaxPRafferty; accepted answer: mklement0 (answer 27327973). - [How to use awk to print lines where a field matches a specific string?](https://stackoverflow.com/questions/2957094/how-to-use-awk-to-print-lines-where-a-field-matches-a-specific-string) — question: yael; accepted answer: Hank Gay (answer 2957225). - [Is it possible to escape regex metacharacters reliably with sed](https://stackoverflow.com/questions/29613304/is-it-possible-to-escape-regex-metacharacters-reliably-with-sed) — question: hek2mgl; accepted answer: mklement0 (answer 29613573). - [Install Latest Stable Version of Ruby Using rbenv](https://stackoverflow.com/questions/30179484/install-latest-stable-version-of-ruby-using-rbenv) — question: user636044; accepted answer: NeronLeVelu (answer 30183040). - [sed : how to print all lines after line with a match?](https://stackoverflow.com/questions/32569032/sed-how-to-print-all-lines-after-line-with-a-match) — question: hawarden_; accepted answer: tripleee (answer 32581300). - [sed + remove "#" and empty lines with one sed command](https://stackoverflow.com/questions/3350223/sed-remove-and-empty-lines-with-one-sed-command) — question: lidia; accepted answer: paxdiablo (answer 3350246). - [Print lines in file from the match line until end of file](https://stackoverflow.com/questions/3434462/print-lines-in-file-from-the-match-line-until-end-of-file) — question: lidia; accepted answer: ghostdog74 (answer 3434563). - [How can I add a comma at the end of every line except the last line?](https://stackoverflow.com/questions/35021524/how-can-i-add-a-comma-at-the-end-of-every-line-except-the-last-line) — question: Joan Triay; accepted answer: tripleee (answer 35021663). - [Delete the first five characters on any line of a text file in Linux with sed](https://stackoverflow.com/questions/3795512/delete-the-first-five-characters-on-any-line-of-a-text-file-in-linux-with-sed) — question: JBeg; accepted answer: PhilR (answer 3806107). - ["sed" command in bash](https://stackoverflow.com/questions/3984824/sed-command-in-bash) — question: ajsie; accepted answer: Jack Kelly (answer 3984855). - [Using ? with sed](https://stackoverflow.com/questions/4348166/using-with-sed) — question: User1; accepted answer: Laurence Gonsalves (answer 4348215). - [Can I use the sed command to replace multiple empty line with one empty line?](https://stackoverflow.com/questions/4521162/can-i-use-the-sed-command-to-replace-multiple-empty-line-with-one-empty-line) — question: Just a learner; accepted answer: Dennis Williamson (answer 4522043). - [How to globally replace strings in lines NOT starting with a certain pattern](https://stackoverflow.com/questions/4953738/how-to-globally-replace-strings-in-lines-not-starting-with-a-certain-pattern) — question: user438602; accepted answer: Dennis Williamson (answer 4953824). - [Replacing from match to end-of-line](https://stackoverflow.com/questions/5047165/replacing-from-match-to-end-of-line) — question: GregH; accepted answer: Andrew Clark (answer 5047180). - [Using different delimiters in sed commands and range addresses](https://stackoverflow.com/questions/5864146/using-different-delimiters-in-sed-commands-and-range-addresses) — question: DerZauberer; accepted answer: geekosaur (answer 5864155). - [Insert linefeed in sed (Mac OS X)](https://stackoverflow.com/questions/6111679/insert-linefeed-in-sed-mac-os-x) — question: Tyilo; accepted answer: przemoc (answer 6112270). - [Sed expression doesn't allow optional grouped string](https://stackoverflow.com/questions/6156259/sed-expression-doesnt-allow-optional-grouped-string) — question: Eduardo; accepted answer: Jonathan Leffler (answer 6157705). - [How to enclose every line in a file in double quotes with sed?](https://stackoverflow.com/questions/6554066/how-to-enclose-every-line-in-a-file-in-double-quotes-with-sed) — question: nw.; accepted answer: Karoly Horvath (answer 6554082). - [How do I add a line of text to the middle of a file using bash?](https://stackoverflow.com/questions/6739258/how-do-i-add-a-line-of-text-to-the-middle-of-a-file-using-bash) — question: PHLAK; accepted answer: brandizzi (answer 6739322). - [Use sed to replace all backslashes with forward slashes](https://stackoverflow.com/questions/6852951/use-sed-to-replace-all-backslashes-with-forward-slashes) — question: Emily; accepted answer: Emiliano Poggi (answer 6853005). - [Using sed to remove a block of text](https://stackoverflow.com/questions/6945621/using-sed-to-remove-a-block-of-text) — question: Scott C Wilson; accepted answer: Maxim Egorushkin (answer 6945788). - [How to get ONLY Second line with SED](https://stackoverflow.com/questions/7103863/how-to-get-only-second-line-with-sed) — question: neversaint; accepted answer: Jonathan (answer 7103911). - [Removing trailing / starting newlines with sed, awk, tr, and friends](https://stackoverflow.com/questions/7359527/removing-trailing-starting-newlines-with-sed-awk-tr-and-friends) — question: ELLIOTTCABLE; accepted answer: dogbane (answer 7359879). - [How to use sed to remove all double quotes within a file](https://stackoverflow.com/questions/7635807/how-to-use-sed-to-remove-all-double-quotes-within-a-file) — question: MRTim2day; accepted answer: user104863 (answer 7635852). - [Combining two sed commands](https://stackoverflow.com/questions/7657647/combining-two-sed-commands) — question: kanika; accepted answer: tripleee (answer 7657662). - [sed substitution with Bash variables](https://stackoverflow.com/questions/7680504/sed-substitution-with-bash-variables) — question: csta; accepted answer: k.parnell (answer 7680548). - [Remove the first word in a text stream](https://stackoverflow.com/questions/7814205/remove-the-first-word-in-a-text-stream) — question: Trcx; accepted answer: Kent (answer 7814456). - [sed join lines together](https://stackoverflow.com/questions/7852132/sed-join-lines-together) — question: veilig; accepted answer: ninjalj (answer 7853846). - [Remove a specific character using awk or sed](https://stackoverflow.com/questions/8008546/remove-a-specific-character-using-awk-or-sed) — question: AabinGunz; accepted answer: Piotr Praszmo (answer 8008729). - [Deleting the first two lines of a file using BASH or awk or sed or whatever](https://stackoverflow.com/questions/8857705/deleting-the-first-two-lines-of-a-file-using-bash-or-awk-or-sed-or-whatever) — question: Amit; accepted answer: RobS (answer 8857734). - [Sed regex and substring negation](https://stackoverflow.com/questions/9053100/sed-regex-and-substring-negation) — question: Anthony; accepted answer: Fred Foo (answer 9053163). - [Using SED with wildcard](https://stackoverflow.com/questions/9189120/using-sed-with-wildcard) — question: mahmood; accepted answer: tom (answer 9189153). - [sed find and replace with curly braces](https://stackoverflow.com/questions/9205669/sed-find-and-replace-with-curly-braces) — question: atdev; accepted answer: kev (answer 9205806). - [How to add to the end of lines containing a pattern with sed or awk?](https://stackoverflow.com/questions/9591744/how-to-add-to-the-end-of-lines-containing-a-pattern-with-sed-or-awk) — question: yasar; accepted answer: user219882 (answer 9591835). - [sed whole word search and replace](https://stackoverflow.com/questions/1032023/sed-whole-word-search-and-replace) — question: ksuralta; accepted answer: Joakim Lundborg (answer 1032039). - [How to replace an entire line in a text file by line number](https://stackoverflow.com/questions/11145270/how-to-replace-an-entire-line-in-a-text-file-by-line-number) — question: user788171; accepted answer: chepner (answer 11145362). - [Replace whole line containing a string using Sed](https://stackoverflow.com/questions/11245144/replace-whole-line-containing-a-string-using-sed) — question: Rahul; accepted answer: Todd A. Jacobs (answer 11245501). - [How can I strip first X characters from string using sed?](https://stackoverflow.com/questions/11469989/how-can-i-strip-first-x-characters-from-string-using-sed) — question: Kokesh; accepted answer: Arnaud F. (answer 11470076). - [How to extract text from a string using sed?](https://stackoverflow.com/questions/11568859/how-to-extract-text-from-a-string-using-sed) — question: RanRag; accepted answer: tripleee (answer 11568930). - [sed with literal string--not input file](https://stackoverflow.com/questions/13055889/sed-with-literal-string-not-input-file) — question: amphibient; accepted answer: Gilles Quénot (answer 13055913). - [How to use sed/grep to extract text between two words?](https://stackoverflow.com/questions/13242469/how-to-use-sed-grep-to-extract-text-between-two-words) — question: user1190650; accepted answer: Brian Campbell (answer 13242517). - [Command to get nth line of STDOUT](https://stackoverflow.com/questions/1429556/command-to-get-nth-line-of-stdout) — question: Alana Storm; accepted answer: Jonathan Leffler (answer 1429628). - [Why doesn't `\d` work in regular expressions in sed?](https://stackoverflow.com/questions/14671293/why-doesnt-d-work-in-regular-expressions-in-sed) — question: user2036880; accepted answer: Kamil (answer 14671415). - [How to use sed to replace only the first occurrence in a file?](https://stackoverflow.com/questions/148451/how-to-use-sed-to-replace-only-the-first-occurrence-in-a-file) — question: David Dibben; accepted answer: Ben Hoffstein (answer 148473). - [Insert line after match using sed](https://stackoverflow.com/questions/15559359/insert-line-after-match-using-sed) — question: user2150250; accepted answer: Gilles Quénot (answer 15559399). - [Why does sed not replace all occurrences?](https://stackoverflow.com/questions/15849119/why-does-sed-not-replace-all-occurrences) — question: Nishant George Agrwal; accepted answer: Bruno Reis (answer 15849152). - [Delete empty lines using sed](https://stackoverflow.com/questions/16414410/delete-empty-lines-using-sed) — question: jonas; accepted answer: Kent (answer 16414489). - [Have sed ignore non-matching lines](https://stackoverflow.com/questions/1665549/have-sed-ignore-non-matching-lines) — question: Paggas; accepted answer: liori (answer 1665662). - [The easiest way to replace white spaces with (underscores) _ in bash](https://stackoverflow.com/questions/1706431/the-easiest-way-to-replace-white-spaces-with-underscores-in-bash) — question: flazzarini; accepted answer: ghostdog74 (answer 1706459). - [sed: print only matching group](https://stackoverflow.com/questions/17511639/sed-print-only-matching-group) — question: mort; accepted answer: iruvar (answer 17511700). - [sed insert line with leading spaces to a specific line](https://stackoverflow.com/questions/18439528/sed-insert-line-with-leading-spaces-to-a-specific-line) — question: Ggdw; accepted answer: Atropo (answer 18439749). - [bash, extract string before a colon](https://stackoverflow.com/questions/20348097/bash-extract-string-before-a-colon) — question: user788171; accepted answer: ray (answer 20348145). - [Delete specific line number(s) from a text file using sed?](https://stackoverflow.com/questions/2112469/delete-specific-line-numbers-from-a-text-file-using-sed) — question: Justin Ethier; accepted answer: Brian Campbell (answer 2112496). - [How to escape single quote in sed?](https://stackoverflow.com/questions/24509214/how-to-escape-single-quote-in-sed) — question: Thomas Bratt; accepted answer: Kent (answer 24509931). - [Why is sed not recognizing \t as a tab?](https://stackoverflow.com/questions/2610115/why-is-sed-not-recognizing-t-as-a-tab) — question: sixtyfootersdude; accepted answer: Mark Byers (answer 2610121). - [How to swap text based on patterns at once with sed?](https://stackoverflow.com/questions/26568952/how-to-swap-text-based-on-patterns-at-once-with-sed) — question: DaniloNC; accepted answer: ooga (answer 26568996). - [How can I output only captured groups with sed?](https://stackoverflow.com/questions/2777579/how-can-i-output-only-captured-groups-with-sed) — question: Pablo; accepted answer: Dennis Williamson (answer 2778096). - [In Bash, how do I add a string after each line in a file?](https://stackoverflow.com/questions/2869669/in-bash-how-do-i-add-a-string-after-each-line-in-a-file) — question: Jason Volkoz; accepted answer: Tom DeGisi (answer 2869736). - [How do I remove newlines from a text file?](https://stackoverflow.com/questions/3134791/how-do-i-remove-newlines-from-a-text-file) — question: Alucard; accepted answer: Tyler McHenry (answer 3134827). - [Replace newlines with literal \n](https://stackoverflow.com/questions/38672680/replace-newlines-with-literal-n) — question: Parze; accepted answer: anubhava (answer 38672741). - [How to print lines between two patterns, inclusive or exclusive (in sed, AWK or Perl)?](https://stackoverflow.com/questions/38972736/how-to-print-lines-between-two-patterns-inclusive-or-exclusive-in-sed-awk-or) — question: fedorqui; accepted answer: fedorqui (answer 38972737). - [sed one-liner to convert all uppercase to lowercase?](https://stackoverflow.com/questions/4569825/sed-one-liner-to-convert-all-uppercase-to-lowercase) — question: magnetar; accepted answer: magnetar (answer 4581564). - [How to extract string following a pattern with grep, regex or perl](https://stackoverflow.com/questions/5080988/how-to-extract-string-following-a-pattern-with-grep-regex-or-perl) — question: wrangler; accepted answer: sidyll (answer 5081519). - [How do I delete all lines in a file starting from after a matching line?](https://stackoverflow.com/questions/5227295/how-do-i-delete-all-lines-in-a-file-starting-from-after-a-matching-line) — question: DocWiki; accepted answer: Dennis Williamson (answer 5227429). - [Using sed, how do you print the first 'N' characters of a line?](https://stackoverflow.com/questions/538664/using-sed-how-do-you-print-the-first-n-characters-of-a-line) — question: Berlin Brown; accepted answer: Paul Tomblin (answer 538676). - [How can I delete all lines that contain a specific string from a text file?](https://stackoverflow.com/questions/5410757/how-can-i-delete-all-lines-that-contain-a-specific-string-from-a-text-file) — question: A Clockwork Orange; accepted answer: SiegeX (answer 5410784). - [Bash tool to get nth line from a file](https://stackoverflow.com/questions/6022384/bash-tool-to-get-nth-line-from-a-file) — question: Vlad Vivdovitch; accepted answer: anubhava (answer 6022431). - [Using sed to delete all lines between two matching patterns](https://stackoverflow.com/questions/6287755/using-sed-to-delete-all-lines-between-two-matching-patterns) — question: Ken; accepted answer: anubhava (answer 6287940). - [How to insert a newline in front of a pattern?](https://stackoverflow.com/questions/723157/how-to-insert-a-newline-in-front-of-a-pattern) — question: Dennis; accepted answer: Dennis (answer 723247). - [How to show only next line after the matched one?](https://stackoverflow.com/questions/7451423/how-to-show-only-next-line-after-the-matched-one) — question: facha; accepted answer: Michał Šrajer (answer 7451456). - [How do I escape slashes and double and single quotes in sed?](https://stackoverflow.com/questions/7517632/how-do-i-escape-slashes-and-double-and-single-quotes-in-sed) — question: KRB; accepted answer: Kusalananda (answer 7517900). - [Delete all lines beginning with a # from a file](https://stackoverflow.com/questions/8206280/delete-all-lines-beginning-with-a-from-a-file) — question: Village; accepted answer: Raymond Hettinger (answer 8206295). - [How to replace a whole line with sed?](https://stackoverflow.com/questions/8822097/how-to-replace-a-whole-line-with-sed) — question: Michael; accepted answer: John Doyle (answer 8822211). - [How to insert a text at the beginning of a file?](https://stackoverflow.com/questions/9533679/how-to-insert-a-text-at-the-beginning-of-a-file) — question: user219882; accepted answer: kev (answer 9533736). - [How to merge every two lines into one from the command line?](https://stackoverflow.com/questions/9605232/how-to-merge-every-two-lines-into-one-from-the-command-line) — question: shantanuo; accepted answer: Kent (answer 9605559). - [How to remove all white spaces from a given text file?](https://stackoverflow.com/questions/9953448/how-to-remove-all-white-spaces-from-a-given-text-file) — question: Lunar Mushrooms; accepted answer: Paulo Scardine (answer 9953487). - [How to add double quotes to a line with SED or AWK?](https://stackoverflow.com/questions/10754682/how-to-add-double-quotes-to-a-line-with-sed-or-awk) — question: minerals; accepted answer: Dennis Williamson (answer 10755347). - [Awk to skip the blank lines](https://stackoverflow.com/questions/11687216/awk-to-skip-the-blank-lines) — question: Gil; accepted answer: Levon (answer 11687266). - [Sed: get lines beginning with some prefix](https://stackoverflow.com/questions/13202715/sed-get-lines-beginning-with-some-prefix) — question: CAMOBAP; accepted answer: John3136 (answer 13202727). - [Using sed to match a pattern and deleting from the line to the end of the file](https://stackoverflow.com/questions/14046878/using-sed-to-match-a-pattern-and-deleting-from-the-line-to-the-end-of-the-file) — question: Albert H; accepted answer: shellter (answer 14046990). - [Fastest way to print a single line in a file](https://stackoverflow.com/questions/15632691/fastest-way-to-print-a-single-line-in-a-file) — question: JBoy; accepted answer: Chris Seymour (answer 15632780). - [How to replace newlines with tab characters?](https://stackoverflow.com/questions/1617724/how-to-replace-newlines-with-tab-characters) — question: Vijay; accepted answer: ghostdog74 (answer 1617769). - [Using sed between specific lines only](https://stackoverflow.com/questions/16202900/using-sed-between-specific-lines-only) — question: hackio; accepted answer: anubhava (answer 16202932). - [How to add new line using sed on MacOS?](https://stackoverflow.com/questions/16576197/how-to-add-new-line-using-sed-on-macos) — question: codereviewanskquestions; accepted answer: Kevin (answer 16576291). - [Sed to remove everything after "." in file using * command?](https://stackoverflow.com/questions/18602234/sed-to-remove-everything-after-in-file-using-command) — question: Novice; accepted answer: Adam Rosenfield (answer 18602273). - [How to use sed to replace a config file's variable?](https://stackoverflow.com/questions/20568515/how-to-use-sed-to-replace-a-config-files-variable) — question: SomeGuyOnAComputer; accepted answer: anubhava (answer 20568559). - [How to append a string at end of a specific line in a file in bash](https://stackoverflow.com/questions/22159044/how-to-append-a-string-at-end-of-a-specific-line-in-a-file-in-bash) — question: Chris F; accepted answer: Steve (answer 22159086). - [sed command to replace multiple spaces into single spaces](https://stackoverflow.com/questions/22939323/sed-command-to-replace-multiple-spaces-into-single-spaces) — question: logan; accepted answer: John Zwinck (answer 22939416). - [Is there a cleaner way of getting the last N characters of every line?](https://stackoverflow.com/questions/24427009/is-there-a-cleaner-way-of-getting-the-last-n-characters-of-every-line) — question: merlin2011; accepted answer: Tiago Lopo (answer 24427087). - [Extract The Second Word In A Line From A Text File](https://stackoverflow.com/questions/25491847/extract-the-second-word-in-a-line-from-a-text-file) — question: Aaron Perry; accepted answer: zedfoxus (answer 25491964). - [Awk/sed script to convert a file from camelCase to underscores](https://stackoverflow.com/questions/28795479/awk-sed-script-to-convert-a-file-from-camelcase-to-underscores) — question: Corentin Peuvrel; accepted answer: Avinash Raj (answer 28795550). - [Using sed to replace tab with spaces](https://stackoverflow.com/questions/31903432/using-sed-to-replace-tab-with-spaces) — question: manshuai; accepted answer: anubhava (answer 31903444). - [Ignoring First line/Column header while reading a file in bash](https://stackoverflow.com/questions/31911179/ignoring-first-line-column-header-while-reading-a-file-in-bash) — question: Jai; accepted answer: chepner (answer 31911198). - [Joining two consecutive lines using awk or sed](https://stackoverflow.com/questions/3194534/joining-two-consecutive-lines-using-awk-or-sed) — question: Vijay; accepted answer: Dimitre Radoulov (answer 3196948). - [capturing groups in sed](https://stackoverflow.com/questions/3302434/capturing-groups-in-sed) — question: Mike Dewar; accepted answer: ninjalj (answer 3302593). - [sed: unescaped newline inside substitute pattern?](https://stackoverflow.com/questions/34576667/sed-unescaped-newline-inside-substitute-pattern) — question: RocketNuts; accepted answer: anubhava (answer 34576684). - [sed + remove string only in the last line of the file](https://stackoverflow.com/questions/3576139/sed-remove-string-only-in-the-last-line-of-the-file) — question: lidia; accepted answer: Scharron (answer 3576183). - [Replace \n(new line) with space in bash](https://stackoverflow.com/questions/39198780/replace-nnew-line-with-space-in-bash) — question: Prometheus; accepted answer: Cyrus (answer 39198829). - [Converting JSON pretty print to one line](https://stackoverflow.com/questions/39648222/converting-json-pretty-print-to-one-line) — question: h.b; accepted answer: P.... (answer 39653559). - [Delete everyting preceding and including a certain substring from variable](https://stackoverflow.com/questions/40506782/delete-everyting-preceding-and-including-a-certain-substring-from-variable) — question: Anne K.; accepted answer: heemayl (answer 40506863). - [Do a tail -F until matching a pattern](https://stackoverflow.com/questions/5024357/do-a-tail-f-until-matching-a-pattern) — question: Sam Alba; accepted answer: jpetazzo (answer 5033775). - [sed - Get only the replaced string from a multiline input & omit unmatched lines!](https://stackoverflow.com/questions/5544322/sed-get-only-the-replaced-string-from-a-multiline-input-omit-unmatched-lines) — question: porg; accepted answer: anubhava (answer 5544539). - [Grep. Line of text that does not end with "abcd"?](https://stackoverflow.com/questions/6006132/grep-line-of-text-that-does-not-end-with-abcd) — question: CCC; accepted answer: tobyodavies (answer 6006139). - [regexp (sed) suppress "no match" output](https://stackoverflow.com/questions/6011661/regexp-sed-suppress-no-match-output) — question: yPhil; accepted answer: przemoc (answer 6011704). - [Skipping the first n lines when using regex with sed?](https://stackoverflow.com/questions/6869449/skipping-the-first-n-lines-when-using-regex-with-sed) — question: Legend; accepted answer: a'r (answer 6869486). - [upper- to lower-case using sed](https://stackoverflow.com/questions/689495/upper-to-lower-case-using-sed) — question: cadrian; accepted answer: strager (answer 689608). - [How to make sed remove lines not matched by a substitution](https://stackoverflow.com/questions/8225822/how-to-make-sed-remove-lines-not-matched-by-a-substitution) — question: Ropez; accepted answer: jaypal singh (answer 8255627). - [sed: just trying to remove a substring](https://stackoverflow.com/questions/8356958/sed-just-trying-to-remove-a-substring) — question: user1077220; accepted answer: aefxx (answer 8356980). - [What is the proper way to insert tab in sed?](https://stackoverflow.com/questions/8394066/what-is-the-proper-way-to-insert-tab-in-sed) — question: dabest1; accepted answer: Jonathan Leffler (answer 8394150). - [escaping newlines in sed replacement string](https://stackoverflow.com/questions/8991275/escaping-newlines-in-sed-replacement-string) — question: spraff; accepted answer: jaypal singh (answer 8991356). - [Removing pattern at the end of a string using sed or other bash tools](https://stackoverflow.com/questions/9191030/removing-pattern-at-the-end-of-a-string-using-sed-or-other-bash-tools) — question: Kay Chan; accepted answer: Birei (answer 9191062). - [sed extracting group of digits](https://stackoverflow.com/questions/9260625/sed-extracting-group-of-digits) — question: Uthman; accepted answer: codaddict (answer 9260734). - [sed to insert on first match only](https://stackoverflow.com/questions/9970124/sed-to-insert-on-first-match-only) — question: SSS; accepted answer: Squazic (answer 9970467).