• Home
  • About
Blue Orange Green Pink Purple

Posts Tagged ‘shell scripting’

You can use the search form below to go through the content and find a specific post or page:

Jul 09

Inserting new line in echo command

Out of curiosity and the perfectionist in me, I “had” to print a line of text in the output inside a BASH shell script. I didn’t really want to split them into multiple echo statements since it’s a waste of space and actually harder to read for me. The first thing I tried was:

> echo “Line1\nLine2″ # Line1\nLine2

That clearly didn’t work out so well… so I thought maybe my Mac (OS X 10.5.7) likes ‘\r\n’ more:

One Giant Robot After Another

  • Recent Ramblings
    • Improving VLC Player load times of .MKV files on Snow Leopard
    • Updating Your Ruby on Rails Application Custom Environment via Passenger Pane
    • Enhanced Open Terminal Here, for Leopard at Maururu
    • Inserting new line in echo command
    • One Giant Robot After Another
  • What I'm Doing...
    • Hot hot hot! 10 mins ago
    • Getting ready for commencement (1/2)! http://t.co/3EOdQ5AR 2 hrs ago
    • getting to leave my name on school property ;) 10 hrs ago
    • More updates...
  • Calendar
    May 2012
    M T W T F S S
    « Nov    
     123456
    78910111213
    14151617181920
    21222324252627
    28293031  
  • Tags
    apple applications featured hosting iPhone Mac OS X Passenger performance productivity review Ruby on Rails shell scripting Snow Leopard technical tips Tutorial
  • Archives
    • November 2009
    • August 2009
    • July 2009
    • June 2009
  • Search






  • Home
  • About

© Copyright One Giant Robot After Another. All rights reserved.
Designed by FTL Wordpress Themes brought to you by Smashing Magazine

Back to Top