LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-21-2009, 11:02 AM   #1
jktstance
LQ Newbie
 
Registered: Jul 2009
Posts: 1

Rep: Reputation: 0
Unique HISTFILEs for each ksh terminal open?


I'm running KDE and I'm using Konsole, which believe is a kshell. I usually have many terminals open at once and I'm trying to have my command line history be unique for each terminal open. I have tried adding this to my .profile:

unset HISTSIZE
unset HISTFILE
HISTSIZE=100;export HISTSIZE
HISTFILE=$HOME/.sh_history_$$;export HISTFILE

I tried using $PID and $PPID instead of $$ with no success. However, as you can probably guess, this is not working. It is creating a .sh_history for a PID but when I open a new Konsole tab it is still using the same history.

It seems I don't understand how PIDs work. When I do a "print $PPID" in the command line, the results are identical for all tabbed terminals, but they are different if I open a brand new Konsole by right clicking on the desktop. However, none of the PPIDs show up as a history file. I'm horribly confused.

Also, I realize that this could create many separate history files as time goes on; is there a way to delete a terminal's history file when closing it?

When I ran GNOME a while ago, command line histories were unique for each terminal and tab I had open. I don't know why it's different in KDE.

Thanks all.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to open a new terminal kushkothari Programming 4 10-21-2008 03:33 AM
unique id code coupon? open source- strange record label raphihell Linux - Software 2 04-23-2008 11:09 AM
LXer: Startup Offers Unique Delivery Model For Open-Source Software LXer Syndicated Linux News 0 12-30-2005 03:31 AM
Quick Ksh Script to open a progie ']['HeBroken Programming 1 12-10-2004 07:27 AM
How to open programs in terminal without being stuck to the terminal?? brynjarh Linux - Newbie 6 07-07-2004 01:52 PM


All times are GMT -5. The time now is 10:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration