The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > SUN Solaris
.
google unix.com



SUN Solaris The Solaris Operating System, usually known simply as Solaris, is a free Unix-based operating system introduced by Sun Microsystems .

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Escape Sequences appearing in scripts jwm-wm UNIX for Dummies Questions & Answers 1 05-08-2008 01:31 PM
CLI Magic: Use ANSI escape sequences to display a clock in your terminal iBot UNIX and Linux RSS News 0 01-22-2008 05:40 AM
awk / escape character OFFSIHR Shell Programming and Scripting 8 11-29-2006 01:28 PM
copying image sequences jonson Shell Programming and Scripting 1 11-15-2006 06:16 AM
AWK and hex sequences JoeTheGuy Shell Programming and Scripting 5 10-17-2002 08:17 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-15-2006
Love's Avatar
Love Love is offline
Registered User
  
 

Join Date: May 2006
Location: Bangalore, Karnataka, INDIA.
Posts: 21
Question Available escape sequences

Hi,

Can any one help me to find available escape sequences in UNIX shell programming? ( Like \n, \c etc,. in C or C++)

Iam generating one report using one of the script, in that it is very much essential.

Regards,
LOVE
  #2 (permalink)  
Old 06-15-2006
blowtorch's Avatar
blowtorch blowtorch is offline Forum Advisor  
Supporter
  
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,350
Perhaps the man page of 'echo' may help you? Check that and post back if you still have any questions/doubts.
  #3 (permalink)  
Old 06-16-2006
Love's Avatar
Love Love is offline
Registered User
  
 

Join Date: May 2006
Location: Bangalore, Karnataka, INDIA.
Posts: 21
Question How to do this?


Thanks friend.

Actually I know
echo "$var\n"
echo "$var\t"

But my requirement is :

$var1 $var2 $var3 $var4 $var5

(Five spaces between each variable output.)

How do I achieve this?

Regards,
Love
  #4 (permalink)  
Old 06-16-2006
blowtorch's Avatar
blowtorch blowtorch is offline Forum Advisor  
Supporter
  
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,350
Like this?
Code:
# var1=1;var2=2;var3=3;var4=4
# echo "$var1     $var2     $var3     $var4"
1     2     3     4
  #5 (permalink)  
Old 06-16-2006
Love's Avatar
Love Love is offline
Registered User
  
 

Join Date: May 2006
Location: Bangalore, Karnataka, INDIA.
Posts: 21
Smile

It is working. But whats about \c ?
Any how thank you very much BlowTourch.

Regards,
Love
  #6 (permalink)  
Old 06-16-2006
pressy's Avatar
pressy pressy is offline Forum Staff  
solaris cultist
  
 

Join Date: Aug 2003
Location: Vienna / Austria (Europe) [EARTH]
Posts: 726
as blowtorch said, read the man page of echo or use google to find some answers.


Code:

# man echo
---snip---

SunOS 5.10          Last change: 20 Jan 2000                    1

User Commands                                             echo(1)

The  following  character  sequences will be recognized within any of the arguments:


              \a       Alert character.

              \b       Backspace.

              \c       Print line without new-line.  All  charac-
                       ters  following the \c in the argument are
                       ignored.

              \f       Form-feed.

              \n       New-line.

              \r       Carriage return.

              \t       Tab.

              \v       Vertical tab.

              \\       Backslash.

              \0n      Where n is the 8-bit character whose ASCII
                       code is the 1-, 2- or 3-digit octal number
                       representing that character.
---snip---
don't get me wrong, but follow the hints if someone tells you a tip. we all want to help you, but not teach you, or doing your job.... looking at your posts on our site you need to read the RULES again.

regards
pressy
(your friendly moderator)
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:54 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0