Register
It is currently Thu Oct 30, 2014 10:01 pm

need help with beginner script


All times are UTC - 6 hours


Post new topic Reply to topic  [ 3 posts ] 
Author Message
 PostPosted: Fri Aug 03, 2012 2:10 pm   

Joined: Fri Aug 03, 2012 2:07 pm
Posts: 20
I am a little confused about making newline to behave as intended. whether i use double quotes or single or escape twice, i.e \\n, the newline gets printed as a literal character. I don't seem to understand what my confusion is right now. help pls.
script follows:

#!/bin/bash

#showing function positional paramters
fxneg () {
echo "get the function name, which is $FUNCNAME."
echo "special parameter 0 is $0."
echo "this is the first argument passed, which is $1."
return
}
fxneg muteman
echo "now that the function is executed,"
echo "special parameter 0 is now $0.\n"
echo "and the number of arguments is $#."


Top
 Profile  
 PostPosted: Fri Aug 03, 2012 5:08 pm   

Joined: Mon Mar 02, 2009 3:03 am
Posts: 550
hi,

see
Code:
help echo


Top
 Profile  
 PostPosted: Sun Aug 05, 2012 12:24 pm   

Joined: Fri Aug 03, 2012 2:07 pm
Posts: 20
thanks
echo -ne
worked


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 12 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP