By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,807 Members | 1,995 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,807 IT Pros & Developers. It's quick & easy.

enable up key from keyboard to get last entered command during my script

P: 63
Hi, I have a script that ask several information to users and stores it in vars.

I was wondering if it's possible to get the last information inserted by pressing the "up" key as we do in "normal" shell, while not running any script.

Did I make my self clear?

Does anyone know how to do this?


Sep 26 '08 #1
Share this Question
Share on Google+
2 Replies

P: 62
Hi, I dont understand exatly your problem

You want add a subrutin to key "up", beetwen your script run and the read dont blocked the script ?
Sep 27 '08 #2

Expert 100+
P: 174
First off have you attempted this your self?

second there is a way i know of that you can get it but please attempt doing this your self then we will help you,

also it depends on the OS you are running from what i think you are using try:

Expand|Select|Wrap|Line Numbers
  1. history | less
the history command in *nix.

also posting your script may help users understand what you want.
Sep 28 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.