![]() |
|
|
|
|
|||||||
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help With Double Sustitution | Mohammed | Shell Programming and Scripting | 1 | 08-12-2007 11:53 PM |
| grep throws in dashes? | kingdbag | UNIX for Dummies Questions & Answers | 3 | 04-27-2007 01:18 PM |
| Double screen | cordobapablo | UNIX for Dummies Questions & Answers | 0 | 10-11-2006 08:13 AM |
| help removing dashes from social security number | Marcia P | UNIX for Dummies Questions & Answers | 2 | 02-28-2006 05:10 PM |
| double GUI problem | adunkey | UNIX for Advanced & Expert Users | 2 | 11-18-2003 01:53 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
double dashes
function date_diff
{ integer _dt1=$(date_to_num ${1:?}) integer _dt2=$(date_to_num ${2:?}) integer _ndt=0 if [[ $_dt2 -gt $_dt1 ]] then ((_ndt=_dt2-_dt1)) fi print -- $_ndt } What does double dash '--' indicate ? Can anyone please answer this |
| Forum Sponsor | ||
|
|
|
|||
|
The "--" option for print allows you to print strings starting with a "-".
e.g. without -- Code:
$print "- some text" ksh: print: 0403-010 A specified flag is not valid for this command. Code:
$ print -- "- some text" - some text cheers |
|||
| Google UNIX.COM |
| Thread Tools | |
| Display Modes | |
|
|
|
The 50 most popular UNIX and Linux searches.
Google Search Cloud for The UNIX and Linux Forums
|
| 421 service not available, remote server has closed connection ^m automate ftp autosys awk trim bash eval bash exec bash for loop close_wait command copy/move folder in unix couldn't set locale correctly curses.h cut command in unix dead.letter find grep find null character in a unix file grep multiple lines grep or grep recursive inaddr_any inappropriate ioctl for device ksh if logrotate.conf lynx javascript mailx attachment mget mtime ping port remove first character from string in k shell replace space by comma , perl script scp recursive segmentation fault(coredump) sftp script snoop unix stale nfs file handle syn_sent tar exclude test: argument expected unix unix .profile unix forum unix forums unix internals unix interview questions unix mtime unix simulator unix.com vi substitute vi+substitute+end+of+line+character while loop within while loop shell script |