" in sh script? I saw the following line in sh script: :> /tmp/foo Is there any difference between this line and th...">All geek questions in one placeWhat is the meaning of ":>" in sh script?I saw the following line in sh script::> /tmp/foo Is there any difference between this line and the next line? > /tmp/foo +4unix shell shNoNoNo Feb 01 '12 at 9:43source share1 answer: is a no-op shell, built-in, always returning the success exit status without outputting anything. This is synonymous with inline true , but shorter.Both are equivalent, although the first assumes that : may be a placeholder for something in the future.+3Blagovest buyukliev Feb 01 '12 at 9:47source shareSource: https://habr.com/ru/post/1394144/More articles:Box object type with variable of reference type - c #Save password for connecting ODBC to MS SQL server from MS Access 2007 - ms-accessHow can I get Rails 3.2 to restart the installed rack application on request in development mode? - ruby-on-railsffmpeg: how to add a pixel effect? - ffmpegHow to implement lazy tri-partition function of constant space? - haskellinvalid decimal separator with NSDecimalNumber on iOS - ioshow does php array_multisort work? - sortingMKUserLocation blue userLocation MKAnnotation crashes the application if it is accidentally touched - iphonejQuery Mobile - cannot hide button using common jquery methods - javascriptHow to suppress the "Current Location" callout in the form of a map - iosAll Articles
I saw the following line in sh script:
:> /tmp/foo
Is there any difference between this line and the next line?
> /tmp/foo
: is a no-op shell, built-in, always returning the success exit status without outputting anything. This is synonymous with inline true , but shorter.
:
true
Both are equivalent, although the first assumes that : may be a placeholder for something in the future.
Source: https://habr.com/ru/post/1394144/More articles:Box object type with variable of reference type - c #Save password for connecting ODBC to MS SQL server from MS Access 2007 - ms-accessHow can I get Rails 3.2 to restart the installed rack application on request in development mode? - ruby-on-railsffmpeg: how to add a pixel effect? - ffmpegHow to implement lazy tri-partition function of constant space? - haskellinvalid decimal separator with NSDecimalNumber on iOS - ioshow does php array_multisort work? - sortingMKUserLocation blue userLocation MKAnnotation crashes the application if it is accidentally touched - iphonejQuery Mobile - cannot hide button using common jquery methods - javascriptHow to suppress the "Current Location" callout in the form of a map - iosAll Articles