Skip to main content
added 163 characters in body
Source Link
Dennis
  • 210.6k
  • 41
  • 370
  • 825

Zsh, 19 17 9 bytes

#!/bin/zsh
<$0>$$;$0

Per consensus on meta, the shebang is excluded from the byte count.

Try it online!Try it online!

Note that TIO's forkbomb protection will kill the process after 113 files have been generated. It can easily generate 1000 files on a system without such conservative resource limits.

Zsh, 19 17 9 bytes

#!/bin/zsh
<$0>$$;$0

Per consensus on meta, the shebang is excluded from the byte count.

Try it online!

Zsh, 19 17 9 bytes

#!/bin/zsh
<$0>$$;$0

Per consensus on meta, the shebang is excluded from the byte count.

Try it online!

Note that TIO's forkbomb protection will kill the process after 113 files have been generated. It can easily generate 1000 files on a system without such conservative resource limits.

added 56 characters in body
Source Link
Dennis
  • 210.6k
  • 41
  • 370
  • 825

Zsh, 19 1717 9 bytes

dd<$0>`w`;exec $0#!/bin/zsh
<$0>$$;$0

I think this fitsPer consensus on meta, the bill. It might overwriteshebang is excluded from the same file a few times, but it will continuously generate new onesbyte count.

Try it online!Try it online!

Zsh, 19 17 bytes

dd<$0>`w`;exec $0

I think this fits the bill. It might overwrite the same file a few times, but it will continuously generate new ones.

Try it online!

Zsh, 19 17 9 bytes

#!/bin/zsh
<$0>$$;$0

Per consensus on meta, the shebang is excluded from the byte count.

Try it online!

deleted 38 characters in body
Source Link
Dennis
  • 210.6k
  • 41
  • 370
  • 825

Zsh, 1919 17 bytes

cp $0 "`w`"
execdd<$0>`w`;exec $0

I think this fits the bill. It might overwrite the same file a few times, but it will continuously generate new ones.

Try it online! (limited to 5 seconds before showing output)Try it online!

Zsh, 19 bytes

cp $0 "`w`"
exec $0

I think this fits the bill. It might overwrite the same file a few times, but it will continuously generate new ones.

Try it online! (limited to 5 seconds before showing output)

Zsh, 19 17 bytes

dd<$0>`w`;exec $0

I think this fits the bill. It might overwrite the same file a few times, but it will continuously generate new ones.

Try it online!

Source Link
Dennis
  • 210.6k
  • 41
  • 370
  • 825
Loading