running an Acii charater in a script.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting running an Acii charater in a script.
# 1  
Old 08-25-2004
Java running an Acii charater in a script.

Hi,
I need to pass a space bar or an enter key in a script for it to return control to my script. How do I do this.

For example the spacebar ascii value is 127, how do I tell the script to run this command.
# 2  
Old 08-25-2004
Your question does not make any sense. But in ksh,

echo " "
will output a space followed by a newline.

echo
will output a newline.

echo " \c"
will output a space without a newline.
# 3  
Old 08-25-2004
The problem is quite simple really - I have a script that does someting in the background (runs another script) but this other task it performs does not pass control back to the first task. So all I want to do is initiat a ascii character (similar to a bell sound) like and enter key to it and it will close the other tasks window and return control back here.
# 4  
Old 08-25-2004
Im not really sure either what it is you are asking for. You can however use 'echo' to output the ascii equivalent of an 8bit octal. See man echo for more.

Example:

echo -e "\nnn" where nnn is the ASCII code character


echo -e "\040" should output a space
echo -e "\007" should sound a bell
# 5  
Old 08-25-2004
exactly what I want. Many thanks.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Why script is running sometimes and not running sometimes?

Hi, I have a script which does couple of database connection and run some SELECT queries to get some output in the file. I am surprised to see :eek: that when i run my script some times it gives the desired out put and sometimes it shows some error :confused: . Suppose if i execute it say... (3 Replies)
Discussion started by: Sharma331
3 Replies

2. Shell Programming and Scripting

Script will keep checking running status of another script and also restart called script at night

I am using blow script :-- #!/bin/bash FIND=$(ps -elf | grep "snmp_trap.sh" | grep -v grep) #check snmp_trap.sh is running or not if then # echo "process found" exit 0; else echo "process not found" exec /home/Ketan_r /snmp_trap.sh 2>&1 & disown -h ... (1 Reply)
Discussion started by: ketanraut
1 Replies

3. Shell Programming and Scripting

Shell Script for continuously checking status of a another script running in background, and immedia

Hi, I want to write a script which continuously checking status of a script running in background by nohup command. And if same script is not running then immediately start the script...please help.. i am using below command to run script nohup system_traps.sh & but in some... (9 Replies)
Discussion started by: ketanraut
9 Replies

4. Shell Programming and Scripting

script for reading logs of a script running on other UNIX server

Hi, I have a script, running on some outside firwall server and it's log of success or failure is maintained in a file. I want to write a script which ftp that server and reads that file and checks the logs and if failure , I will send mail notification. Please let meknow if I am not... (1 Reply)
Discussion started by: vandana.parwani
1 Replies

5. Shell Programming and Scripting

Running a unix script(which is calling another script inside that) in background

Hi all, I am having a script ScriptA which is calling a script ScriptB in the same server and copying files to second server and have to execute one script ScriptC in the second server. THis First script ScriptA is the main script and i have to execute this process continously. for Keeping... (2 Replies)
Discussion started by: rohithji
2 Replies

6. Shell Programming and Scripting

How to stop a script running in remote server from local script

Hi, I have googled for quite some time and couldn't able to get what exactly I am looking for.. My query is "how to stop a shell script which is running inside a remote server, using a script"??? can any one give some suggestions to sort this out. (1 Reply)
Discussion started by: mannepalli
1 Replies

7. Solaris

Running from Shell Vs running from RC script

Hi, i have a script which need to do behave differently when run as a startup process from init.d/ rc2.d script and when run manually from shell. How do i distinguish whether my script is run by init process or by shell?? Will the command /proc/$$/psinfo | grep "myscript" work well???... (2 Replies)
Discussion started by: vickylife
2 Replies

8. Shell Programming and Scripting

Charater comparison

I have two files. Each file has one line with 2500 charaters in it and both lines should be the same, but thay are not. I need to compare the two lines and find where the differences are. So what I need to do is compare each character one at a time to find out whats different. (4 Replies)
Discussion started by: Tornado
4 Replies

9. UNIX for Dummies Questions & Answers

Inserting a delimiter after certain charater position

Hi, I have a string : - ICFFHASMTAAMPFINCL22082006000002548789632 and i want to add delimiter after certain charater position through a script, eg. ICFFH,ASMTAAMPF,INCL,22082006,000002548789632. I have tried and am able to achieve it through cut-paste. But i don't want to use cut paste as it... (6 Replies)
Discussion started by: divz
6 Replies

10. Shell Programming and Scripting

replacing charater

I need a help here. My administrator made some changes and we couldn't access some files any more. I am trying to replace a list of files from one format to another. Can anyone help me please? Here is an example of aaa_bbbb_cccccc.03172002_02:30:08 How can I replace the ':' with... (3 Replies)
Discussion started by: odogbolu98
3 Replies
Login or Register to Ask a Question