How to use a subscript and a super script while printing a character


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to use a subscript and a super script while printing a character
# 1  
Old 08-12-2010
Question How to use a subscript and a super script while printing a character

I want to print a output after executing a awk command

How to represent a subscript or a superscript while using print command

Code:
eg : Ts.  where character 's' is subscript of T 
       T2 where '2' is the superscript of T


thank you.
Shashi:
# 2  
Old 08-12-2010
If you're printing HTML you can use tags.

If you're trying to display on a character terminal you're probably out of luck unless it's a unicode terminal, and even then, it'd mean having to translate each individual sub-scripted character into the UTF8 code representing it before you print.
# 3  
Old 08-12-2010
im not using it for HTML, its to display a character on the terminal. Is there any other work around to achieve this
# 4  
Old 08-12-2010
Not really. A character terminal displays fixed-size, fixed-width characters by definition; you can't selectively resize certain bits. Change colors, yes, change size, no. The unicode subscript characters are about as good as you can get for a genuine representation of subscripts in a terminal.
This User Gave Thanks to Corona688 For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Character printing with AWK

I was wondering if I could use AWK to print from the nth character position to nth for all records in the file. All I have been doing is printing/copying fields rather than characters. I found a way to print lines greater/less/equal to a character length which led me to believe there is a way... (3 Replies)
Discussion started by: MIA651
3 Replies

2. Shell Programming and Scripting

printing only columns containing a determined character with awk

Hello I'm trying to extract two columns from a database using awk, the thing is i have a variable number of columns in each row, and I just need to get out the two first ones ending in "," This is an example: ABE, ABE V149 MAZIE ARD CYN ACY, ACY, , , ,TEC, , 5000, , , 1, ZNY,ZDC ABE, ABE... (1 Reply)
Discussion started by: vir
1 Replies

3. Shell Programming and Scripting

Awk while-loop printing extra character

Hi, I'm using a while-loop in an awk script. If it matches a regular expression, it prints a line. Unfortunately, each line that is printed in this loop is followed by an extra character, "1". While-statement extracted from my script: getline temp; while (temp ~ /.* x .*/) print temp... (3 Replies)
Discussion started by: redbluefish
3 Replies

4. Shell Programming and Scripting

Printing special character in bash

I am using this character as a delimiter 'þ' Currently, I set it straight: DELIMITER='þ' However, while copying the file, this character often gets mangled. Is there a bash way (perhaps using tr or printf) of generating this character. It corresponds to "chr(0xfe)" if using perl. (I've... (6 Replies)
Discussion started by: sentinel
6 Replies

5. Shell Programming and Scripting

SUPER simple bash script to repeat a command...

I need to repeat this command on a configurable interval: igal -a -r -U -w 6 I tried this: #!/bin/bash igal -a -r -U -w 6 sleep 30 Just a guess that it MIGHT work. Can anyone point me in the right direction? -R (6 Replies)
Discussion started by: robfindlay
6 Replies

6. Shell Programming and Scripting

Script using awk works only as super user

hi friends, I am a new Sun Solaris 10 user. I have the following script line=$(awk '{if(substr($0,1,1)!="#" && substr($0,1,1)!=";" && substr($0,1,1)!=" " && substr($0,1,1)!="/" && substr($0,1,1)!="*" && substr($0,1,1)!="\\" && length($0)!=0) ... (10 Replies)
Discussion started by: gjithin
10 Replies

7. Solaris

Sunsolaris shell script runs only as super user

Hi Friends, I am new to Sun solaris unix.I am facing problem while runing my kornshell script just as an ordinary user.The script works fine while i am working as a super user.the script just uses awk to check the first charcter of a file and then copies the file to another folder. Do i... (4 Replies)
Discussion started by: gjithin
4 Replies

8. UNIX for Dummies Questions & Answers

[OpenServer 5]Line Printing and special character (é @)

Hello, On Sco OpenServer 5, i want to print using the lpr command, no CUPS installed. I print on an HP LaserJet 4050 on LAN (IP 192.168.x.x) the printer is installed by HP Network Printer service. it works fine, but Specials characters, like é, @ or ° print bad characters. Is there... (5 Replies)
Discussion started by: tankd
5 Replies

9. HP-UX

BAD SUPER BLOCK - Run fsck with alternate super block number

Error received when I tried to restore a blank disk with an 'auto recovery' DDS tape via HP-UX recovery system 2.0 onto a 1Gb SCSI. I assumed it would do the setup, wrong. Could someone tell me the procedure to initial disk for recovering files using cpio. The system is a HP-UX 9.04 version on a... (1 Reply)
Discussion started by: admin wanabee
1 Replies

10. Shell Programming and Scripting

Calling subscript but sleep halts the main script

Ok, I have written a main script which checks a directory contents every 30 secs then sleeps. The subscript does a usermod, if the user is logged on, it sleeps for 30 secs and then trys again over and over again. Here's the problem. when the subscript is called ./subscript.sh or exec... (1 Reply)
Discussion started by: doublejz
1 Replies
Login or Register to Ask a Question