Code
abduct@insomnia:~/Desktop/shellcode# pwd | awk '{ n=split($0,pwd_array,"/"); for(i=2;i<=n;i++) { if(i==n) { printf "%s", toupper(pwd_array[i]) } else { printf "%s->", toupper(pwd_array[i]) } } }'
ABDUCT->DESKTOP->SHELLCODE
abduct@insomnia:~/Desktop/shellcode#
If your awk version allows it, there is a join() method that will take an array and concat it with a spacer for you instead of looping through the array yourself. You should really just be googling this shit... it is comon sense if you have any brains at all.
from the mighty duck.