Stty and copy special character


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Stty and copy special character
# 1  
Old 08-08-2013
Stty and copy special character

Hello,

I do have a little issue here and Google doesn't give me any solution @this moment.

In HP UX Vi editor: I want to place this character: ®

I copied it from internet or for example Word Special Symbols. But how do I paste it in Vi?

Many thanks in advance Smilie
Sincerely,

Arjan
# 2  
Old 08-08-2013
Can you display it in with vi? If so, can you get it into a file, all by itself? If we call this file RTM (for Registered Trade Mark), then you could open the file that you wish to insert it to and:-
  1. Please the cursor in the correct position.
  2. Insert a new-line (break the current line in the correct place)
  3. Press ESC then k once to move up a line.
  4. Type :r RTM and press ENTER
  5. Press kJxJx to join the (now) three bits of the line together again and remove the added space.
Hopefully that will do it.

Depending on your display font (mine is vt100 emulator) you might get away with this to generate your file RTM:-
Code:
echo "\0256" > RTM

This will display the character for ASCII octal value 256. An alternates you could try is character 656.




I hope that this helps.


Robin
Liverpool/Blackburn
UK
This User Gave Thanks to rbatte1 For This Post:
# 3  
Old 08-08-2013
Hello Robin,

Thanks for great solution. Could you please share with us how we can see/check ASCII table any commands for same, I will be grateful to you on same.


Thanks,
R. Singh
# 4  
Old 08-08-2013
Do you want something to display all the characters?

If so, you can:-
Code:
#!/bin/ksh
i=0;until [ $i -ge 8 ]
do
   j=0;until [ $j -ge 8 ]
   do
      k=0;until [ $k -ge 8 ]
      do
         echo "$i$j$k=\"\0$i$j$k\""
         ((k=$k+1))
      done
      ((j=$j+1))
   done
   ((i=$i+1))
done|strings

Some implementations may prefer print to echo

If this isn't what you were after, I'm afraid I've missed intended the question. Can you elaborate?




Robin
# 5  
Old 08-08-2013
Thanks.

You replied:

"Can you display it in with vi? If so, can you get it into a file, all by itself? If we call this file RTM (for Registered Trade Mark), then you could open the file that you wish to insert it to and:-"

But I can't display it in Vi. When i copy and past ® it displays a dot (.) in Vi. So I cannot create a file named RTM.

With Regards,

Arjan

---------- Post updated at 07:59 AM ---------- Previous update was at 07:51 AM ----------

This works fine though Smilie

---------- Post updated at 08:00 AM ---------- Previous update was at 07:59 AM ----------

This works fine was a answer to your script.
# 6  
Old 08-08-2013
Great. Glad to be of help. Smilie



Robin
# 7  
Old 08-08-2013
Sorry.. Unix.com was struggling with me.

Thanks.

You replied:

"Can you display it in with vi? If so, can you get it into a file, all by itself? If we call this file RTM (for Registered Trade Mark), then you could open the file that you wish to insert it to and:-"

But I can't display it in Vi. When i copy and past ® it displays a dot (.) in Vi. So I cannot create a file named RTM.

With Regards,

Arjan
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Special character $$

Hi, on ksh What does the following do? grep -v "toolbox" $home_oracle/.profile >$home_oracle/.profile.$$ Thanks. Please use CODE tags as required by forum rules! (3 Replies)
Discussion started by: big123456
3 Replies

2. Shell Programming and Scripting

Escape special character

Hi, How to use * in call to pl/sql block from shell script? The line "select * from" is causing all files and directiores to show up in email notification but if I give all column names then it works, Please let me know how to use '*' instead of giving all column names, in other wirds how to... (2 Replies)
Discussion started by: sandy162
2 Replies

3. Shell Programming and Scripting

Vi special character

When editing a file, vi displays a special character as ^L. Can you tell me the escaped character to be used in awk? And can that escaped character be used in a regexp in both sed and awk? (7 Replies)
Discussion started by: dmesserly
7 Replies

4. Shell Programming and Scripting

Decimal value for special character

I am seeing an special character in my file when i do the cat filename | od-bc I see a value of 376 for that special character. I would like to find the decimal value for the character. For example the decimal value for ctrl-Y is char(25). Appreciate help on this. (11 Replies)
Discussion started by: pinnacle
11 Replies

5. Shell Programming and Scripting

How to check for special character in a value

Hi, I have a variable and to it always alphanumeric value will be assigned. If the value has any special characters in it then in the if statement it should exit like below if (value has any speacial character) then exit else .... fi can any one suggest how to acheive this? (4 Replies)
Discussion started by: lavnayas
4 Replies

6. Shell Programming and Scripting

Deleteing one character after an special character

I have below line in a unix file, I want to delete one character after "Â". 20091020.Non-Agency CMO Daily Trade Recap Â~V Hybrids The result should be : 20091020.Non-Agency CMO Daily Trade Recap  Hybrids i dont want to use "~V" anywhere in the sed command or any other command, just remove... (1 Reply)
Discussion started by: mohsin.quazi
1 Replies

7. Shell Programming and Scripting

Special character \

Hi, In the shell script, i need to remove the special charater "\" with "\\". For example, i need to replace "D:\FXT\ABC.TXT" with "D:\\FXT\\ABC.TXT". However, when trying to do something like , i get the below error :- -->echo "D:\FXT\ABC.TXT" | sed -e 's#\#\\#g' sed: 0602-404 Function... (7 Replies)
Discussion started by: amit_arora
7 Replies

8. Shell Programming and Scripting

special character

Hi, I am trying to unload file from a database. Which contains few lines with the character below. Rest of the data was unloaded appropriately. a) What does this below character means? b) How can i remove it, I already have sed '/^$/d' c) Will this effect the file by any means... (4 Replies)
Discussion started by: tostay2003
4 Replies

9. UNIX for Dummies Questions & Answers

How to copy/move to a file with a special character as the 1st char in the filename?

I am trying to create files with special characters in its filenames for testing purposes. This is on a Linux RHEL4 but this should also be applicable on a Unix shell. I am able to create files with special characters in the filenames...e.g. cp -pv foo.gif \*special.gif cp -pv foo.gif \... (6 Replies)
Discussion started by: sqa777
6 Replies

10. Programming

special character ?

hey there im a bit stuck on executing commands that include the special character '?'. can someone recommend a way on how i would be able to execute it?? i thought the glob function could be useful (still mite be) but upon entering the command 'ls pars?' it listed all the files in the... (1 Reply)
Discussion started by: mile1982
1 Replies
Login or Register to Ask a Question