LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-11-2005, 12:05 PM   #1
begby
LQ Newbie
 
Registered: Jan 2005
Location: Toronto
Posts: 28

Rep: Reputation: 15
command line history


Hello,
When I use my linux system @ home, I can hit the 'up' arrow to get the previous command line . But at work,I hit 'up', I dont get the previous command, just some jibberish. Is there a way to set it up in my .profile or something to allow command line history?

If it helps, the system is HP-UX and the shell sh

there's some strange things in the .profile

if [ "$TERM" = "" ]
then
eval ` tset -s -Q -m ':?hp' `
else
eval ` tset -s -Q `
fi
stty erase "^H" kill "^U" intr "^C" eof "^D"
stty hupcl ixon ixoff
tabs
 
Old 03-11-2005, 01:32 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
i'd assume you're not using bash. what's HP-UX's default? csh? ksh?
 
Old 03-11-2005, 02:54 PM   #3
begby
LQ Newbie
 
Registered: Jan 2005
Location: Toronto
Posts: 28

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by acid_kewpie
i'd assume you're not using bash. what's HP-UX's default? csh? ksh?
yeah, there is no bash, the default is ksh
 
Old 03-11-2005, 03:12 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
well there you go. in the grand scheme of UNIX implementations, Linux is a potential cop out... bash is often thought of as a bloated bit of kit by longterm users of AIX or HPUX... that being said, i'm sure you could still install it.
 
Old 03-11-2005, 03:26 PM   #5
begby
LQ Newbie
 
Registered: Jan 2005
Location: Toronto
Posts: 28

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by acid_kewpie
well there you go. in the grand scheme of UNIX implementations, Linux is a potential cop out... bash is often thought of as a bloated bit of kit by longterm users of AIX or HPUX... that being said, i'm sure you could still install it.
installing bash isn't an option, unfortunately. Is there a way around this?
 
Old 03-11-2005, 03:37 PM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
sorry, i'm not aware of any other shells that support command history.
 
Old 03-11-2005, 04:32 PM   #7
shengchieh
Member
 
Registered: Jul 2004
Location: Palo Alto, CA
Distribution: #! Korora
Posts: 472

Rep: Reputation: 30
If you want other shell, like bash, type

/bin/sh

and then do your stuffs.

Sheng-Chieh

p.s. There are also
/bin/csh
/bin/ksh
/bin/tcsh
and many others.
 
Old 03-12-2005, 01:58 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
like bash? sh isn't bash... we know how to run other shells, there just aren't others available that perform what they want, and they are already using ksh...

i just looked at what else i had, and csh does history too...
 
  


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
command line history crickett Linux - General 13 12-17-2009 08:22 AM
Solaris 9 - Command line history itsjustme Solaris / OpenSolaris 4 08-03-2007 01:07 PM
clean command line history basilogics Linux - Newbie 9 11-04-2005 04:25 AM
History command amer_58 Linux - General 5 06-24-2005 12:26 PM
history with command line compu73rg33k Linux - Software 3 02-16-2004 03:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:41 PM.

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
Open Source Consulting | Domain Registration