Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PRINT & ECHO

Status
Not open for further replies.

jestrada101

Technical User
Mar 28, 2003
332
0
0
Is there any advantages of using PRINT over ECHO or vice-versa?
 
Man printf vs. man echo

Using printf statements you have greater control over formatting the output.
 
If you're using the Korn shell, [tt]print[/tt] is the preferred command. It has a lot more functionality as far as formatting and options, than [tt]echo[/tt] has.

If you need to stay bourne shell compatable, stay with echo.

Hope this helps.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top