Create a program which accepts a string on stdin, and outputs to stdout either the string ``tsk'', or an empty string. The formar case happens when the input string contains the substring ``nigger'' (case-insensitive). The latter happens in other cases.
Shortest program wins. You have 7*24 hours from the timestamp of this poast. Good luck!
Name:
Anonymous2022-04-18 0:20
nlsh> take input from stdin if string 'hello' is entered replace with 'world' otherwise print nothing >>> Run: while read line; do if echo "$line" | grep -q "hello"; then echo "world"; else echo "$line"; fi; done [Y/n]: Y aff aff hello world ^Cnlsh> no i mean print out empty string if something else >>> Run: while read line; do if echo "$line" | grep -q "hello"; then echo "world"; else echo; fi; done [Y/n]: Y hello world foajfoa
^Cnlsh> make it case insensitive >>> Run: while read line; do if echo "$line" | grep -i "hello"; then echo "world"; else echo; fi; done [Y/n]: Y