# -*- judoscript -*- # hello world # print a simple string on stdout . "Hello World"; # argv # access command line parameters (no segmentation fault accepted, nor silent exception, so some languages must explicitly check the presence of the argument) . $args[0]; # env # access environment variable . #home; # test file exists # return exit code error (non zero) if a file does not exist exit(!"/etc/mtab".fileExists()); # test file readable # return exit code error (non zero) if a file is not readable exit(!"/etc/mtab".fileReadable()); # formatting # print integers in a simple formatted string . a=1," + ",b=2," = ",a+b; # system # call an external program and check the return value exec 'false'; if (r) . "false failed"; exec 'echo done'; # sed in place # remove #-comments from a file (modifying the file, i.e. in place) getFileAsString(#args[0]).replaceAll('#.*', '').writeToFile(#args[0]);