We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Lonely Integer - Bash!
Lonely Integer - Bash!
Sort by
recency
|
194 Discussions
|
Please Login in order to post a comment
in case if you don't want to use sort | uniq etc. for some reason:
read n
mapfile -t arr
arr=({arr[@]}" | tr ' ' '\n' | sort -n | uniq -u))
echo "${arr[@]}"
My solution: !/bin/bash
contador=0 auxiliar=""
read entrance
read -a entrance2
for(( i=0; i<"{#entrance2[@]}"; l++ )); do if(("{entrance2[l]}"));then contador=$((contador+1)) fi
done
echo "$auxiliar"