fork download
  1. #include <cstdlib>
  2.  
  3. int main() {
  4. system("alias cat='command cat <<< '\''if [ "$1" != "+treats" ]; then echo "meow"; else command cat "${@:2}"; fi'\'' | source /dev/stdin'");
  5. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:4:108: error: stray '@' in program
     system("alias cat='command cat <<< '\''if [ "$1" != "+treats" ]; then echo "meow"; else command cat "${@:2}"; fi'\'' | source /dev/stdin'");
                                                                                                            ^
prog.cpp: In function 'int main()':
prog.cpp:4:50: error: expected ')' before '$1'
     system("alias cat='command cat <<< '\''if [ "$1" != "+treats" ]; then echo "meow"; else command cat "${@:2}"; fi'\'' | source /dev/stdin'");
                                                  ^
stdout
Standard output is empty