3 added 171 characters in body
source | link

Like user000001 answered, sed '3{/^$/dd;}' file is good enough, but it will only show you that output. If you want to modify the file, and your sed is the GNU sed, you can use sed -i '3{/^$/d}' file (for GNU sed, the ; before } can also be omitted here).

`-i[SUFFIX]'
`--in-place[=SUFFIX]'
     This option specifies that files are to be edited in-place.  GNU
     `sed' does this by creating a temporary file and sending output to
     this file rather than to the standard output.(1).

With FreeBSD/OS/X sed, use sed -i '' '3{/^$/d;}' file.

Like user000001 answered, sed '3{/^$/d}' file is good enough, but it will only show you that output. If you want to modify file use sed -i '3{/^$/d}' file

`-i[SUFFIX]'
`--in-place[=SUFFIX]'
     This option specifies that files are to be edited in-place.  GNU
     `sed' does this by creating a temporary file and sending output to
     this file rather than to the standard output.(1).

Like user000001 answered, sed '3{/^$/d;}' file is good enough, but it will only show you that output. If you want to modify the file, and your sed is the GNU sed, you can use sed -i '3{/^$/d}' file (for GNU sed, the ; before } can also be omitted here).

`-i[SUFFIX]'
`--in-place[=SUFFIX]'
     This option specifies that files are to be edited in-place.  GNU
     `sed' does this by creating a temporary file and sending output to
     this file rather than to the standard output.(1).

With FreeBSD/OS/X sed, use sed -i '' '3{/^$/d;}' file.

2 format code as code
source | link

Like user000001 answered, sed '3{/^$/d}' filesed '3{/^$/d}' file is good enough, but it will only show you that output. If you want to modify file use sed -i '3{/^$/d}' filesed -i '3{/^$/d}' file

-i[SUFFIX]' --in-place[=SUFFIX]' This option specifies that files are to be edited in-place. GNU `sed' does this by creating a temporary file and sending output to this file rather than to the standard output.(1).

`-i[SUFFIX]'
`--in-place[=SUFFIX]'
     This option specifies that files are to be edited in-place.  GNU
     `sed' does this by creating a temporary file and sending output to
     this file rather than to the standard output.(1).

Like user000001 answered, sed '3{/^$/d}' file is good enough, but it will only show you that output. If you want to modify file use sed -i '3{/^$/d}' file

-i[SUFFIX]' --in-place[=SUFFIX]' This option specifies that files are to be edited in-place. GNU `sed' does this by creating a temporary file and sending output to this file rather than to the standard output.(1).

Like user000001 answered, sed '3{/^$/d}' file is good enough, but it will only show you that output. If you want to modify file use sed -i '3{/^$/d}' file

`-i[SUFFIX]'
`--in-place[=SUFFIX]'
     This option specifies that files are to be edited in-place.  GNU
     `sed' does this by creating a temporary file and sending output to
     this file rather than to the standard output.(1).
1
source | link

Like user000001 answered, sed '3{/^$/d}' file is good enough, but it will only show you that output. If you want to modify file use sed -i '3{/^$/d}' file

-i[SUFFIX]' --in-place[=SUFFIX]' This option specifies that files are to be edited in-place. GNU `sed' does this by creating a temporary file and sending output to this file rather than to the standard output.(1).