Skip to main content
Saved another byte thanks to Pavel
Source Link
AdmBorkBork
  • 43.5k
  • 5
  • 103
  • 284

PowerShell, 54 48 4545 44 bytes

if(99-gt(gc $PSCOMMANDPATH).length$PSCOMMANDPATH|wc -lt99c)){1;exit}3#

Try it online!Try it online!

Try it doubled!Try it doubled!

Try it tripled!Try it tripled!

Gets its own invocation path with $PSCOMMANDPATH and performs a get-content on the file. If the .lengthcharacter count of that file is eitherless than 5499 or (checked via 108wc -c from coreutils), then we output 1 and exit (i.e., stop execution). That accounts for the original code and the doubled code. Otherwise we output 3 and exit. The actual code that's in the doubled or tripled sections is meaningless, since either we'll exit before we get to it, or it's behind a comment #.

Saved 6 bytes thanks to Mr. Xcoder
Saved 33 4 bytes thanks to Pavel

PowerShell, 54 48 45 bytes

if((gc $PSCOMMANDPATH).length-lt99){1;exit}3#

Try it online!

Try it doubled!

Try it tripled!

Gets its own invocation path with $PSCOMMANDPATH and performs a get-content on the file. If the .length of that file is either 54 or 108, then we output 1 and exit (i.e., stop execution). That accounts for the original code and the doubled code. Otherwise we output 3 and exit. The actual code that's in the doubled or tripled sections is meaningless, since either we'll exit before we get to it, or it's behind a comment #.

Saved 6 bytes thanks to Mr. Xcoder
Saved 3 bytes thanks to Pavel

PowerShell, 54 48 45 44 bytes

if(99-gt(gc $PSCOMMANDPATH|wc -c)){1;exit}3#

Try it online!

Try it doubled!

Try it tripled!

Gets its own invocation path with $PSCOMMANDPATH and performs a get-content on the file. If the character count of that file is less than 99 (checked via wc -c from coreutils), then we output 1 and exit (i.e., stop execution). That accounts for the original code and the doubled code. Otherwise we output 3 and exit. The actual code that's in the doubled or tripled sections is meaningless, since either we'll exit before we get to it, or it's behind a comment #.

Saved 6 bytes thanks to Mr. Xcoder
Saved 3 4 bytes thanks to Pavel

Saved 3 bytes thanks to Pavel
Source Link
AdmBorkBork
  • 43.5k
  • 5
  • 103
  • 284

PowerShell, 54 4848 45 bytes

if((gc $PSCOMMANDPATH).length-in48,96lt99){1;exit}3#

Try it online!Try it online!

Try it doubled!Try it doubled!

Try it tripled!Try it tripled!

Gets its own invocation path with $PSCOMMANDPATH and performs a get-content on the file. If the .length of that file is either 54 or 108, then we output 1 and exit (i.e., stop execution). That accounts for the original code and the doubled code. Otherwise we output 3 and exit. The actual code that's in the doubled or tripled sections is meaningless, since either we'll exit before we get to it, or it's behind a comment #.

Saved 6 bytes thanks to Mr. Xcoder
Saved 3 bytes thanks to Pavel

PowerShell, 54 48 bytes

if((gc $PSCOMMANDPATH).length-in48,96){1;exit}3#

Try it online!

Try it doubled!

Try it tripled!

Gets its own invocation path with $PSCOMMANDPATH and performs a get-content on the file. If the .length of that file is either 54 or 108, then we output 1 and exit (i.e., stop execution). That accounts for the original code and the doubled code. Otherwise we output 3 and exit. The actual code that's in the doubled or tripled sections is meaningless, since either we'll exit before we get to it, or it's behind a comment #.

Saved 6 bytes thanks to Mr. Xcoder

PowerShell, 54 48 45 bytes

if((gc $PSCOMMANDPATH).length-lt99){1;exit}3#

Try it online!

Try it doubled!

Try it tripled!

Gets its own invocation path with $PSCOMMANDPATH and performs a get-content on the file. If the .length of that file is either 54 or 108, then we output 1 and exit (i.e., stop execution). That accounts for the original code and the doubled code. Otherwise we output 3 and exit. The actual code that's in the doubled or tripled sections is meaningless, since either we'll exit before we get to it, or it's behind a comment #.

Saved 6 bytes thanks to Mr. Xcoder
Saved 3 bytes thanks to Pavel

Saved 6 bytes thanks to Mr. Xcoder
Source Link
AdmBorkBork
  • 43.5k
  • 5
  • 103
  • 284

PowerShell, 5454 48 bytes

if((gc $PSCOMMANDPATH).length-in54in48,10896){1;exit}3;exit;3#

Try it online!Try it online!

Try it doubled!Try it doubled!

Try it tripled!Try it tripled!

Gets its own invocation path with $PSCOMMANDPATH and performs a get-content on the file. If the .length of that file is either 54 or 108, then we output 1 and exit (i.e., stop execution). That accounts for the original code and the doubled code. Otherwise we output 3 and exitexit. The actual code that's in the doubled or tripled sections is meaningless, since either way we'll exit before we get to it, or it's behind a comment #.

Saved 6 bytes thanks to Mr. Xcoder

PowerShell, 54 bytes

if((gc $PSCOMMANDPATH).length-in54,108){1;exit}3;exit;

Try it online!

Try it doubled!

Try it tripled!

Gets its own invocation path with $PSCOMMANDPATH and performs a get-content on the file. If the .length of that file is either 54 or 108, then we output 1 and exit (i.e., stop execution). That accounts for the original code and the doubled code. Otherwise we output 3 and exit. The actual code that's in the doubled or tripled sections is meaningless, since either way we'll exit before we get to it.

PowerShell, 54 48 bytes

if((gc $PSCOMMANDPATH).length-in48,96){1;exit}3#

Try it online!

Try it doubled!

Try it tripled!

Gets its own invocation path with $PSCOMMANDPATH and performs a get-content on the file. If the .length of that file is either 54 or 108, then we output 1 and exit (i.e., stop execution). That accounts for the original code and the doubled code. Otherwise we output 3 and exit. The actual code that's in the doubled or tripled sections is meaningless, since either we'll exit before we get to it, or it's behind a comment #.

Saved 6 bytes thanks to Mr. Xcoder

Source Link
AdmBorkBork
  • 43.5k
  • 5
  • 103
  • 284
Loading