Quote:
Originally Posted by
Legend986
I am seeing a type of display I mean if the path is long, unix is substituting a '~'. How would I do that here? For example, if I find a command in a path, how would I substitute a tilde in the output?
Over egging the pudding I think.
~ is normally short-hand for $HOME.
You would have to look at what you were going to print, decide if it's too long, if so decide where to truncate, then print your truncated string and truncation indicator.