Ps and top in a custom shell


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Ps and top in a custom shell
# 1  
Old 12-06-2012
Ps and top in a custom shell

I am having a hard time wrapping my head around implementing top and ps in a custom shell.

What I have is a shell that allows you to do basic commands as you would in a regular bash shell, but when I do the ps command, it gives me all of the processes within my regular bash shell rather than my custom shell.

Is there a simple way of fixing this?
# 2  
Old 12-06-2012
you want to exclude -bash process from ps command?
Code:
ps -ef | grep -v bash


Last edited by Franklin52; 12-06-2012 at 10:40 AM.. Reason: Please use code tags for data and code samples, thanks
# 3  
Old 12-06-2012
Quote:
Originally Posted by Ziun
What I have is a shell that allows you to do basic commands as you would in a regular bash shell, but when I do the ps command, it gives me all of the processes within my regular bash shell rather than my custom shell.
Well -- they are. If you're running your own shell from bash, bash still exists, waiting for your shell to quit.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Help w/ writing a custom Linux shell using x86 assembly (NASM)

Hello world, I thought this might be a great start to help me with an assignment I have that requires me to write an assembly program that mimics a 32 bit Linux command shell: When launched, your program will perform the following steps in a loop: 1. Print a prompt, specifically “$ “... (1 Reply)
Discussion started by: turtle13
1 Replies

2. Shell Programming and Scripting

Parsing custom data into xml in Shell

Hi , I have data as below in a text file { 'AAA' => { 'A1' => 'a1 comment', 'A2' => 'a2 comment' }, 'BBB' => { 'B1' => 'b1 comment' }, 'CCC' => { 'C1' => 'c1 comment', 'C2' => 'c2 comment', 'C3' => 'c3 comment' 'C4' => 'c4... (2 Replies)
Discussion started by: vivek d r
2 Replies

3. UNIX for Dummies Questions & Answers

Custom icons for shell script

Hi, Also posted in other forum. I have an application that I wrote in C using the GTK toolkit that runs on the Linux system. I have a shell script than when run executes two terminals to open a client and server application. I would like to know more on how to create custom start-up... (2 Replies)
Discussion started by: fedora18
2 Replies

4. Programming

Custom icons for shell script

Hi, I have an application that I wrote in C using the GTK toolkit that runs on the Linux system. I have a shell script than when run executes two terminals to open a client and server application. I would like to know more on how to create custom start-up icons for my program. ie. using... (1 Reply)
Discussion started by: fedora18
1 Replies

5. Shell Programming and Scripting

Custom Shell

I have a jump off server, which grants SSH access to a few other servers. I would like to create a custom shell which can be assigned to specific user accounts which runs a menu script upon login, where they can select which server they want to jump too, however should they hit ctrl-c or any... (1 Reply)
Discussion started by: JayC89
1 Replies

6. UNIX Desktop Questions & Answers

command to run another shell on top of your default shell?

Can someone point me to the right command to to run another shell on top of your default shell? Thanks PS If admin sees this It is not home work. I am old man who wants to learn unix in my spare time. I CURRENTLY DO NOT GO SCHOOL, COLLEGE OR UNIVERSITY. (2 Replies)
Discussion started by: Bill Thompson
2 Replies

7. Shell Programming and Scripting

Custom UNIX Shell Command

Hi, This may be a silly question. I have been searching for a while on this. How can I create a custom unix command using C (a command similar to 'echo'). (1 Reply)
Discussion started by: tinufarid
1 Replies

8. Shell Programming and Scripting

Need help with shell script - output of top command

I have written shell script to send file as an attachemt of email and output of "top -o res" command as email body. it works fine if i execute manually from prompt but it does not send "top -o res" command output in email body when it is executed via crontab. Any suggestions. My script is below:... (5 Replies)
Discussion started by: needyourhelp10
5 Replies

9. UNIX for Dummies Questions & Answers

Custom Reporting Utilities for SHell (CRUSH)

If you are interested in a set of utilities designed for reporting solutions within the shell, check out CRUSH on Google code. crush-tools - Project Hosting on Google Code (0 Replies)
Discussion started by: watingo
0 Replies

10. UNIX for Dummies Questions & Answers

top ten utilities in shell scripting?

Let's get some feedback about the top ten ute's you guys use in writing your scripts - I mean yeah it depends on the job and what you're trying to accomplish, but there ARE those commands (sed, grep, awk, cut, etc.) that most will use time and again... ...so, what do you use? (3 Replies)
Discussion started by: diego
3 Replies
Login or Register to Ask a Question