Skip to main content
added 210 characters in body
Source Link
Jens Erat
  • 261
  • 2
  • 7

SH script, 812 8 7

Store a file with

sed p $0*

in its own, empty directory and run from this directory using sh [file] or set executable.

 

Old alternative with 8 characters, but doesn't need its own directory. Store a file with

sed p<$0p $0

and run using sh [file] or set executable.


 

Old alternative with 12 characters12 characters:

sed -i- p $0

This will actually output to the program file itself, but where to output was not specified. Replicates itself at an exponential rate.

SH script, 8

Store a file with

sed p $0

or

sed p<$0

and run using sh [file] or set executable.


 

Old alternative with 12 characters:

sed -i- p $0

This will actually output to the program file itself, but where to output was not specified. Replicates itself at an exponential rate.

SH script, 12 8 7

Store a file with

sed p *

in its own, empty directory and run from this directory using sh [file] or set executable.

 

Old alternative with 8 characters, but doesn't need its own directory. Store a file with

sed p $0

and run using sh [file] or set executable.

Old alternative with 12 characters:

sed -i- p $0

This will actually output to the program file itself, but where to output was not specified. Replicates itself at an exponential rate.

added 22 characters in body
Source Link
Jens Erat
  • 261
  • 2
  • 7

SH script, 8

Store a file with

sed p $0

or

sed p<$0

and run using sh [file] or set executable.


Old alternative with 12 characters:

sed -i- p $0

This will actually output to the program file itself, but where to output was not specified. Replicates itself at an exponential rate.

SH script, 8

Store a file with

sed p $0

and run using sh [file] or set executable.


Old alternative with 12 characters:

sed -i- p $0

This will actually output to the program file itself, but where to output was not specified. Replicates itself at an exponential rate.

SH script, 8

Store a file with

sed p $0

or

sed p<$0

and run using sh [file] or set executable.


Old alternative with 12 characters:

sed -i- p $0

This will actually output to the program file itself, but where to output was not specified. Replicates itself at an exponential rate.

added 63 characters in body
Source Link
Jens Erat
  • 261
  • 2
  • 7

SH script, 128

Store a file with

sed -i- p $0

and run using sh [file] or set executable.


Old alternative with 12 characters:

sed -i- p $0

This will actually output to the program file itself, but where to output was not specified. Replicates itself at an exponential rate.

SH script, 12

Store a file with

sed -i- p $0

and run using sh [file] or set executable.

This will actually output to the program file itself, but where to output was not specified. Replicates itself at an exponential rate.

SH script, 8

Store a file with

sed p $0

and run using sh [file] or set executable.


Old alternative with 12 characters:

sed -i- p $0

This will actually output to the program file itself, but where to output was not specified. Replicates itself at an exponential rate.

Source Link
Jens Erat
  • 261
  • 2
  • 7
Loading