Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

#Sed, 1 byte

Sed, 1 byte

d

As sed requires an input stream, I'll propose a convention that the program itself should be supplied as input.

$ sed -e 'd' <<<'d' | wc -c
0
$ sed -e '' <<<'d' | wc -c
2

An alternative program is x, but that only changes from 1 to 2 bytes of output when deleted.

#Sed, 1 byte

d

As sed requires an input stream, I'll propose a convention that the program itself should be supplied as input.

$ sed -e 'd' <<<'d' | wc -c
0
$ sed -e '' <<<'d' | wc -c
2

An alternative program is x, but that only changes from 1 to 2 bytes of output when deleted.

Sed, 1 byte

d

As sed requires an input stream, I'll propose a convention that the program itself should be supplied as input.

$ sed -e 'd' <<<'d' | wc -c
0
$ sed -e '' <<<'d' | wc -c
2

An alternative program is x, but that only changes from 1 to 2 bytes of output when deleted.

Source Link
Toby Speight
  • 7k
  • 1
  • 30
  • 43

#Sed, 1 byte

d

As sed requires an input stream, I'll propose a convention that the program itself should be supplied as input.

$ sed -e 'd' <<<'d' | wc -c
0
$ sed -e '' <<<'d' | wc -c
2

An alternative program is x, but that only changes from 1 to 2 bytes of output when deleted.

AltStyle によって変換されたページ (->オリジナル) /