You are viewing a single comment's thread. Return to all comments →
Bash.
starts='^hackerrank.+' ends='.+hackerrank$' both='^(hackerrank).*\1?$' sed -E \ -e '1d' \ -e "s/$starts/1/" \ -e "s/$ends/2/" \ -e "s/$both/0/" \ -e '/1|2|0/! c\-1'
Find HackerRank
You are viewing a single comment's thread. Return to all comments →
Bash.