help with Korn script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting help with Korn script
# 1  
Old 11-05-2008
help with Korn script

Hello All..
Can someone tell me how to use "backspace" key in a script. I tried to use ^C (type from the keyboard) but its not working. I know its a silly question to ask but I am really frustated with this thing for good 1 hour or so.
I am trying to provide an input file to a script so that I do not need to hit "backspace" key manually.

thanks in advance guys.
# 2  
Old 11-05-2008
You can try:

Code:
printf "\010"

# 3  
Old 11-05-2008
When editing your script using vi, use this exact sequence:

Code:
^V^H

Where ^V is a "Control-V" and ^H is "Control-H".

Example:

Code:
echo "hello^V^H^V^H^V^Hwow"

will produce as output, when run:

Code:
hewow

Notice that the Control-V will be displayed as a simple caret (^) when typed.

You can use exactly the same technique on the command line for both ksh and bash.
-mschwage
# 4  
Old 11-05-2008
check whether stty erase somecharanters and the character you set work
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Pass script with parameter in korn shell script

I have written a script which will take input parameter as another script. However, if the script passed as input parameter has parameters then this script doesn't work. I have a script b.ksh which has 1 and 2 as parameters I have a script c.ksh which has 3,4 and 5 as parameters vi a.ksh... (1 Reply)
Discussion started by: Vee
1 Replies

2. Shell Programming and Scripting

perl script to korn shell script

I have a perl script which replaces "*" with "|" and "~" with "\n" also it takes the file content starting with ST till record starting with SE written a differnet file, I wanted this to be convereted into KSH script, can anyone help me perl script: perl -e ' $file_counter=0;... (7 Replies)
Discussion started by: atlantis_yy
7 Replies

3. Shell Programming and Scripting

help with korn script

Hi guys, I am new to unix scripting. I have a folder rx and it has subfolders rx1,rx2 and rx3 each subfolder has 4 directories each load,land,arch and extr I have the below tar and rm commands using wich we should write a shell script rx1-- tar -cf... (2 Replies)
Discussion started by: Kornscript
2 Replies

4. Shell Programming and Scripting

pass null value to sql script from korn shell script

There are 4 parameters that I have to pass from korn shell to sql script. 1) I have to check if $1 , $2 , $3 and $4 are null values or not . How can I do that ? 2) Once its determined that these values are null (in the sense they are empty) how can I pass null values to sql script... (11 Replies)
Discussion started by: megha2525
11 Replies

5. Homework & Coursework Questions

Korn Shell Script

1. The problem statement, all variables and given/known data: Write a korn shell script with an alfanumeric string as argument. The script lists the file's names in the current directory that contain the given string as substring and that can be read and written. 2. Relevant commands, code,... (3 Replies)
Discussion started by: burm
3 Replies

6. Shell Programming and Scripting

Korn Shell Script

I have to solve some exercises in Korn Shell, but i'm having some problems. For example: Write a korn shell script with an alfanumeric string as argument. The script lists the file's names in the current directory that contain the given string as substring and that can be read and written. I... (3 Replies)
Discussion started by: burm
3 Replies

7. Shell Programming and Scripting

Running a BATCH script from my korn script with multiparameters

I've this BATCH script to run from my korn script... The command is /usr/local/BATCH/runBatch.sh PARAM1 'PARAM2 -PARAM21 PARAM22' (runBatch takes parameter 1 = PARAM1 parameter 2 = 'PARAM2 -PARAM21 PARAM22' ) If i run this command from command line it just runs fine... ... (7 Replies)
Discussion started by: prash184u
7 Replies

8. UNIX Desktop Questions & Answers

korn shell script

hi all i am writing the korn shell script. i have a SQL script which gives me the folowing output DSA.WLG.20050713211544.20051025.20050713211544 28991 1130198400 DSA.WLG.20050713211544.20051025.20050713211544 25881 1130198400 DSA.WLG.20050711210100.20051025.20050711210100 25881 ... (3 Replies)
Discussion started by: pavan_test
3 Replies

9. UNIX for Dummies Questions & Answers

korn shell script

hello., i have 2 files.. 1 file is in this folder /home/test/ssk/DSA.WLG.20050713211544.20050710.20050713211544 (this part) other file is in this folder /home/kk/dev/DSA.WLG.20050711210100.20050710.20050711210100 ... (1 Reply)
Discussion started by: pavan_test
1 Replies

10. Shell Programming and Scripting

Problem in korn script

Hi i am facing this problem, please help me in my korn script ------------------------------------------------------------- export $job_ids echo "#Message creation" >message-typing.typ chmod 777 message-typing.typ echo "orderParser:1:999:210:T" >>message-typing.typ echo... (9 Replies)
Discussion started by: pallavimahajan
9 Replies
Login or Register to Ask a Question