Sponsored Content
Top Forums Shell Programming and Scripting [ksh] how to reload history file without entering a command Post 303027884 by DevuanFan on Thursday 27th of December 2018 10:04:56 AM
Old 12-27-2018
[ksh] how to reload history file without entering a command

I'm basically looking for the ksh equivalent of bash's PROMPT_COMMAND="history -r", where simply redrawing the command prompt in a terminal will cause ksh to reload the history file.

At the risk of sounding incredibly lazy (in which case I would be guilty as charged), I've noticed that if I have two terminals open--call them terminal A and terminal B--and run some commands in terminal A, I can only see those commands in terminal B (while scrolling up and down through the history) after I execute a command in terminal B. What I would like is for me to be able to just press enter at the command prompt in terminal B--without having to execute a command--and then be able to see the commands from terminal A.

Is there a setting in .kshrc that would force the shell to reload the history file each time the command prompt is drawn?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

entering a long command

hello everyone! Very basic question for the guru's in here but anyways, I am trying to type a command that is longer than the line. What character do I use to continue my command on the next line? Thanks in advance.... Todd (1 Reply)
Discussion started by: hedrict
1 Replies

2. UNIX for Dummies Questions & Answers

ksh: how to make [up arrow] recall command history

I want to get my up arrow key to recall my previous commands in Korn shell. Anyone help please? thanks a bunch! BG (3 Replies)
Discussion started by: BG_JrAdmin
3 Replies

3. UNIX for Dummies Questions & Answers

Reload user crontab file

Hi Guys, Our user crontab files are located at /var/spool/cron/crontabs. I have to make some modifications to it. I have all the crontab entries in a file called 'crontab.actual'. I made changes to this file and now I want to reload these changes from the crontab.actual file to my crontab... (12 Replies)
Discussion started by: vandi
12 Replies

4. Solaris

Command for checking modification history on file

What is the command for checking modification history on file? ---------- Post updated at 01:20 PM ---------- Previous update was at 12:35 PM ---------- Let me rephrase this. On a regular Unix file can I at least check to see the time and date history modification of the file? (6 Replies)
Discussion started by: jastanle84
6 Replies

5. Shell Programming and Scripting

What is the ksh equivalent to bash's "history -c" command?

Hi, What is the korn shell equivalent of bash shell's "history -c" command? I do know, how to clear the history list in ksh, I can do the following: > ~/.sh_historybut still, I am interested to know the single one line command as 'history -c' gives error on my ksh (1 Reply)
Discussion started by: royalibrahim
1 Replies

6. Solaris

Login delay after entering id (40 secs) same after entering pw

Hi all, I have just installed Solaris 10 on an old Fujitsu Primepower 650 which has been wiped clean. I haven't installed anything apart from the OS yet, so the machine is 99% idle. I get long delays when logging in, first after entering the id then another long delay after entering a valid... (8 Replies)
Discussion started by: longjon
8 Replies

7. UNIX for Dummies Questions & Answers

Command to reload a zone

I just created a CNAME and i was told a zone needs to be reloaded after creating a CNAME. What is the command to reload a zone after the CNAME has been created? Thanks in advance (1 Reply)
Discussion started by: German Shepherd
1 Replies

8. Shell Programming and Scripting

UNIX CO command for file version history

Hello :) I'm a newb when it comes to shell scripting and was wondering about a command(s) for a script that could be used to checkout a certain number of version/revision histories of a file. I know for the latest revison you "co filename" or for a certain revision number "co -r*.* filename"... (2 Replies)
Discussion started by: MN-DBA
2 Replies

9. AIX

Checking the command history file in AIX

Hello, The system has been rebooted and I need to see the commands executed in the system prior to restart by the oracle user.The history command is not showing me the commands executed prior to reboot. Please advise. Best regards, Vishal (1 Reply)
Discussion started by: Vishal_dba
1 Replies

10. Shell Programming and Scripting

Script not entering VRFY after nc command

I am making a bash script right now and am running into an issue. As I am new to scripting, I do not know exactly what to do to get what I'm looking for in my script. Essentially, my script will automatically input VRFY common names after nc Example: nc 192.168.248.133 25 VRFY Allison... (2 Replies)
Discussion started by: ksrhayward
2 Replies
ul(1)							      General Commands Manual							     ul(1)

Name
       ul - process underscores for terminal

Syntax
       ul [-i] [-t terminal] [name...]

Description
       The  command  reads  the  named files (or standard input if none are given) and translates occurrences of underscores to the sequence which
       indicates underlining for the terminal in use, as specified by the environment variable TERM.  The -t option overrides  the  terminal  kind
       specified  in  the  environment.  The file /etc/termcap is read to determine the appropriate sequences for underlining.	If the terminal is
       incapable of underlining, but is capable of a standout mode then that is used instead.  If the terminal can overstrike, or  handles  under-
       lining automatically, degenerates to If the terminal cannot underline, underlining is ignored.

       The  -i option causes to indicate underlining by a separate line containing appropriate dashes `-'; this is useful when you want to look at
       the underlining which is present in an output stream on a crt-terminal.

Options
       -i Displays underscoring on separate line containing appropriate dashes (-).

       -t terminal
	  Uses type of specified terminal in place your terminal's type.

Restrictions
       The command usually outputs a series of backspaces and underlines intermixed with the text to indicate underlining.  No attempt is made	to
       optimize the backward motion.

See Also
       man(1), nroff(1), colcrt(1)

																	     ul(1)
All times are GMT -4. The time now is 06:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy