Unix shell with history features like in bash


 
Thread Tools Search this Thread
Top Forums Programming Unix shell with history features like in bash
# 1  
Old 05-24-2009
Unix shell with history features like in bash

hii to all
i am developing a simple unix shell in c i want to add history feature in that how could i do that plz help if there is any tutorial or website plz put it here

history feature should be like that in bash, when press up key show the previous command typed in console

plz be descriptive

thanks
# 2  
Old 05-24-2009
Just look at the source code for any modern shell for ideas. There are a number of ways to do it.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. What is on Your Mind?

The Great History of UNIX (1969-1999) | 30 Years of UNIX History | YouTube Video

I am pleased to announce this new video in 1080 HD for UNIX lovers honoring thirty years of UNIX history spanning from 1969 to 1999 presented in 150 seconds (two and a half minutes) in 1080 HD, celebrating the 50th anniversary of UNIX. The Great History of UNIX (1969-1999) | 30 Years of UNIX... (8 Replies)
Discussion started by: Neo
8 Replies

2. Ubuntu

useradd - shell missing features after adding user

Hi, I need to create a user from a bash script so i have to use useradd. The problem is that when i create a user with: useradd -d /home/sample -m sample after i login with that user I have no history in bash, path do not appears, i can't use arrows and so on. When I use adduser everything is... (5 Replies)
Discussion started by: ktm
5 Replies

3. UNIX for Dummies Questions & Answers

bash history - each session in different file

Hello How to configure, or where to have each session history in different file Example: someone is connecting as root and at this time is creating file in which we have history of executed command to server is connecting another user and is created another file with command executed by... (1 Reply)
Discussion started by: vikus
1 Replies

4. UNIX for Dummies Questions & Answers

bash preferred or ksh with bash features

I'm a user on a fairly locked down sys V server. By default, I have ksh set as my default shell. I added to my .profile: bash -o vi so when I login, it goes into bash so I can take advantage of tab completion and use the up key to bring up previous commands. However, whenever I want to exit, I... (2 Replies)
Discussion started by: mrwatkin
2 Replies

5. Shell Programming and Scripting

features of a new SHELL

Hello, My team and I planing to create a new shell. We are including features like handing the "command not found" exception, etc.... 1)Can you please give some suggestions on what do do while writing a new shell..... 2)can you please give me your problems with the existing shells..My... (15 Replies)
Discussion started by: nsharath
15 Replies

6. UNIX for Dummies Questions & Answers

unix command - bash shell

Hey all, I need to know how many lines of C code are in a source bundle. I have extracted the bundle and hence there is a big directory tree with C files everywhere. So far I have something like: find . -name "*.c" | grep \ ./*/*/*/*/*/* obviously wrong, if someone could help me out... (3 Replies)
Discussion started by: zigga15
3 Replies

7. UNIX for Dummies Questions & Answers

Shell features ???

Hi Can anybody explain the following shell features with example a) Command line editing b) filename completion c) job control (1 Reply)
Discussion started by: skyineyes
1 Replies

8. Windows & DOS: Issues & Discussions

Evaluate uUNIX and MSDOS shell script features

I need to select the main features of shell scripting on UNIX and evaluate their MSDOS equivalent. can anyone suggest some online resources articles anything?? Thanks in advance (0 Replies)
Discussion started by: deemon111
0 Replies

9. Shell Programming and Scripting

Creating a command history feature in a simple UNIX shell using C

I'm trying to write a history feature to a very simple UNIX shell that will list the last 10 commands used when control-c is pressed. A user can then run a previous command by typing r x, where x is the first letter of the command. I'm having quite a bit of trouble figuring out what I need to do, I... (2 Replies)
Discussion started by: -=Cn=-
2 Replies

10. AIX

AIX OS Features versus Solaris OS Features

Hi Unix Experts, I like to compile and compare all the features that AIX OS (541L) and Solaris OS (Solaris 10) provide. If somebody can shed on this topic would be highly appreciated. Thank you, Khan (0 Replies)
Discussion started by: hkhan12
0 Replies
Login or Register to Ask a Question