Timeline for Remove extra header lines from file, except for the first line
Current License: CC BY-SA 3.0
9 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 8, 2016 at 2:44 | history | edited | Jeff Schaller♦ | CC BY-SA 3.0 | clarified input/output filenames; updated step 3 wording; added step "4" of capturing output |
| Nov 8, 2016 at 2:29 | history | edited | don_crissti | CC BY-SA 3.0 | you already " omit lines that look like the header" with 'grep' there's no need to ditch the 1st one via 'tail' |
| Jan 27, 2016 at 13:09 | comment | added | Stéphane Chazelas | @JeffSchaller, recently as in 12 years ago. And head -1 has been obsoleted for decades before that. | |
| Jan 27, 2016 at 13:04 | history | edited | Stéphane Chazelas | CC BY-SA 3.0 | Adding -F for fixed string search, -x for whole line, -e to avoid problem with headers starting with "-". tail as a more obvious command to print the tail. |
| Jan 27, 2016 at 1:25 | history | edited | Jeff Schaller♦ | CC BY-SA 3.0 | added 2 characters in body |
| Jan 27, 2016 at 0:53 | comment | added | Jeff Schaller♦ | Both good additions. Thanks to don_crissti for indirectly pointing out that posix recently removed -1 syntax from head, in favor of -n 1. | |
| Jan 26, 2016 at 19:34 | comment | added | iruvar | or perhaps { IFS= read -r head; printf '%s\n' "$head"; grep -vF "$head" ; } <file | |
| Jan 26, 2016 at 19:29 | vote | accept | Gaius Augustus | ||
| Jan 26, 2016 at 19:06 | history | answered | Jeff Schaller♦ | CC BY-SA 3.0 |