Skip to content

Instantly share code, notes, and snippets.

@roblogic
Created Mar 25, 2019
Embed
What would you like to do?
Golf solution to "The third string", https://codegolf.stackexchange.com/a/182195/15940
[ ${#1} = 0 ]&&{ x="$2";}||{ x="$1";}
for((;i++<4;)){
o=$i${x:1}
[[ $o != $1 ]]&&[[ $o != $2 ]]&&{ echo $o;exit;}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment