I\'m new to awk and sed, and I\'m looking for a way to truncate a line at 80 characters, but I\'m printing several strings in that line using printf. The last two strings are th
I had the same issue trying to customize my bash prompt with a truncated directory name. What finaly worked was:
PS1='\u@\h:`echo $(basename $PWD) | cut -c 1-15`\$ '