Available escape sequences


 
Thread Tools Search this Thread
Operating Systems Solaris Available escape sequences
# 1  
Old 06-15-2006
Question Available escape sequences

Smilie 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  
Old 06-15-2006
Perhaps the man page of 'echo' may help you? Check that and post back if you still have any questions/doubts.
# 3  
Old 06-16-2006
Question How to do this?

Smilie
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  
Old 06-16-2006
Like this?
Code:
# var1=1;var2=2;var3=3;var4=4
# echo "$var1     $var2     $var3     $var4"
1     2     3     4

# 5  
Old 06-16-2006
Bug

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

Regards,
Love Smilie
# 6  
Old 06-16-2006
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)
# 7  
Old 06-20-2006
MySQL

pls dont mistake me.
My intension was not to trouble you. Iam very new to this group, UNIX as well as to this professional. But I'll learn it soon and help other required like you.
Thanks for your reply.

Love
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to remove escape sequences from a text file?

Hello friends, Could anyone please advise on how to remove escape sequences from a text file? $ file input.txt input.txt: ASCII English text, with escape sequences I'm able to see those escape characters when opened in vi editor like shown below: ^ but not when I run more... (6 Replies)
Discussion started by: magnus29
6 Replies

2. Shell Programming and Scripting

Extraction of sequences from files

hey!!! I have 2 files file1 is as ids.txt and is >gi|546473186|gb|AWWX01630222.1| >gi|546473233|gb|AWWX01630175.1| >gi|546473323|gb|AWWX01630097.1| >gi|546474044|gb|AWWX01629456.1| >gi|546474165|gb|AWWX01629352.1| file2 is sequences.fasta and is like >gi|546473233|gb|AWWX01630175.1|... (9 Replies)
Discussion started by: harpreetmanku04
9 Replies

3. Shell Programming and Scripting

Escape Sequences

Hi Gurus, Escape sequences \n, \t, \b, \t, \033(1m are not working. I just practiced these escape sequences. It worked first. Later its not working. Also the command - echo inside the script editor shows as shaded by a color. Before that echo inside the script editor wont show like this.... (4 Replies)
Discussion started by: GaneshAnanth
4 Replies

4. Shell Programming and Scripting

Auto escape script to escape special chars in script args

This is a bit off the wall, but I often need to run scripts where there are argument values that contain special characters. For example, $ ./process.exe -t M -N -o temp.mol.s -i ../molfiles/N,N\',N\'\'-trimethylbis\(hexamethylene\)triamine.mol && sfile_space_to_tab.sh temp.mol.s temp.s It... (1 Reply)
Discussion started by: LMHmedchem
1 Replies

5. Shell Programming and Scripting

Mail utility not displaying escape sequences

Hello! I created a file that displays text underlined. However when I pass the file into the mail utility it doesnt display the underline. Here is the code: echo "\n\033 cat test_underline.txt mail -s "testing of underline" <email_address> < test_underline.txt Any ideas?... (8 Replies)
Discussion started by: DPERTS
8 Replies

6. Shell Programming and Scripting

trimming sequences

My file looks like this: But I would like to 'trim' all sequences to the same lenght 32 characters, keeping intact all the identifier (>GHXCZCC01AJ8CJ) Would it be possible to use awk to perform this task? (2 Replies)
Discussion started by: Xterra
2 Replies

7. UNIX for Dummies Questions & Answers

How to input escape sequences in Linux tty?

More details: Unicode, Framebuffer. I tried to press Esc and then what should follow, letters or brackets, but seems not to work. Probably i do something wrong. If somebody is familiar with escape sequences in the console, how do you do that? Thanks in advance. (4 Replies)
Discussion started by: Action
4 Replies

8. Programming

Trigraph sequences

Hi, i have read trigraph sequence in The C99 Draft (N869, 18 January, 1999) printf("Eh???/n"); will produce printf("Eh?\n"); what does that mean? i tried that but i am getting the same output i.e Eh???/n. what actually these tri graph characters are? any idea why ,when and... (1 Reply)
Discussion started by: MrUser
1 Replies

9. UNIX for Dummies Questions & Answers

Escape Sequences appearing in scripts

I hope this question isn't too vague... i recently switched from RedHat to Solaris 10, and found that the parts of a script that copy files between directories no longer work because escape sequences are appearing at the start and end of the filenames being read #!/usr/bin/bash cd... (1 Reply)
Discussion started by: jwm-wm
1 Replies
Login or Register to Ask a Question