Sponsored Content
Full Discussion: Need some help with this...
Top Forums Programming Need some help with this... Post 302138623 by porter on Tuesday 2nd of October 2007 05:18:23 PM
Old 10-02-2007
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.
 
All times are GMT -4. The time now is 09:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy