pushd/popd missing on SGI irix 6.5.11


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers pushd/popd missing on SGI irix 6.5.11
# 1  
Old 12-11-2003
pushd/popd missing on SGI irix 6.5.11

I know that pushd/popd are built into csh, but I'm trying to run a set of 3rd party make files that use sh.

My problem is that sh simply squawks that pushd and popd are not found, then the make dies due to the error.

I've searched the entire system, and they are indeed missing. Evidently SGI forgot about sh needing them, and must have yanked them with this release of IRIX(6.5.11m).

I tried the SGI web site and I cannot locate them. I also tried contacting SGI and they are less than helpful.

I'm looking for the source for those 2 utilities so that I can compile and install them. It doesn't have to be the exact source, just a close enough approximation to do a simple 'pushd <dir>'; <series of commands>; popd. I thought I'd ask if anyone had the source available before I go and try to write them from scratch.

Thanks for any assistance you can offer!!!
# 2  
Old 12-11-2003
As a stop gap solution, you can download a demo version of the Hamilton C shell which, according to their site, is a complete recreation of the UNIX c shell but with added utilities such as popd, and pushd. Hamilton C Shell Link The full version is 350 bucks to buy
# 3  
Old 12-11-2003
This does not make sense. pushd and popd must be built into the shell to be of any real use. They must be builtins for the same reason that cd must be a builtin. Of course, posix senselessly mandates an external version of "cd", so most verdors have that, but the only examples of its use are highly contrived.

Depending on which version of sh you have, you may have one or more of the two favors of functions available. If so, pushd and popd can probably be implemented as functions, but the code for the functions would be in your script

This is a snap in ksh, and the korn shell book gives an implemention.

Are you sure that the make files really want to use sh? Try this:
SHELL=/usr/bin/csh make
# 4  
Old 12-11-2003
Thanks, I think I can use alias

Thanks for the idea. I forgot that when a process terminates, that it's context gets lost, so it doesn't matter if it did a 'cd' or not.

It's really surprising to me that the pushd and popd commands aren't working in sh.

I have tried to create the following aliass

$ alias pushd=cd
$ alias popd="cd -"

but these only work if I interactively type in the commands after starting sh

running make, starts a new sh, and then the aliases are gone.

I tried adding these to .profile but it does not seem to run that file. I put an
echo "Hi from .profile"
into the .profile and I dont' get that either.

The man sh page does not show any other files than
$HOME/.profile
being used by sh, but I don't see when that one gets used. Maybe it's used at login time if sh happens to be your login shell, but my login shell is tcsh
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Pushd popd

Howdy, I'm working through the book LEARN PYTHON THE HARD WAY, Appendix: Command Line Crash Course. I got to wondering if pushd and popd are really ever used all that much? Thank you for your insights, DN (4 Replies)
Discussion started by: danuke
4 Replies

2. Shell Programming and Scripting

Pushd Popd and Dirs History?

Hello everyone, finally made these commands working, but I don't know how ti implement the history command for this utility? Anyone? Please please (28 Replies)
Discussion started by: iennetastic
28 Replies

3. UNIX for Dummies Questions & Answers

pushd and popd

I'm learning about pushd and popd, and the section in my book defines them as functions to put in the .profile file, but I've noticed that the commands obviously already exist. I was wondering -- how do I find out where these commands are? Is there some kind other command/series of commands I can... (11 Replies)
Discussion started by: Straitsfan
11 Replies

4. UNIX for Dummies Questions & Answers

pushd and popd

This question is related to pushd and popd. After I have pushed directories, I would like to see what are the contents of the stack currently before I execut e popd. The reason is that many a times we forget (or can get confused when multiple shells are open) what we pushed and would like to first... (4 Replies)
Discussion started by: sharanbr
4 Replies

5. Shell Programming and Scripting

pushd popd

Are there any arguments for 'pushd' and 'popd' so that it wont output the whole stack to the screen everytime i call the commands? (1 Reply)
Discussion started by: owijust
1 Replies

6. UNIX for Advanced & Expert Users

IRIX 6.5 Boot CDROM for SGI

Hi all ! I'm a french new owner of an Octane workstation with a R10000@195Mhz. I've find a release of IRIX 6.5 thanks to a friend but I've only the tree (files and repertories) on a hard drive with NTFS partition. I try to burn the first installtion Cd (with the miniroot) on Windows Xp with Nero... (0 Replies)
Discussion started by: Nononsch
0 Replies

7. UNIX for Advanced & Expert Users

IRIX (SGI) question

How to change icon of my application (say script file) in IRIX icon view. (1 Reply)
Discussion started by: kosta_mirkin
1 Replies

8. IP Networking

cannot ping router from sgi irix

anyone available to help me config sgi octane to netscape and networking mac os X? i have three macs and one sgi. setup on a dsl netopia router. all 4 computers can ping each other by addresses and by names. all the macs can ping the router, but the sgi cannot ping the router, "network is... (0 Replies)
Discussion started by: eidde
0 Replies

9. UNIX for Advanced & Expert Users

IRIX SGI user admin

Hi, I would like to add users to an IRIX system (SGI). Does anyone have any idea of how to add the user? Is there a graphical interface like: admintool(SUN), sam(HPUX), or solstice(SUN) that does the function? Thanks in advance, (1 Reply)
Discussion started by: vtran4270
1 Replies

10. UNIX for Dummies Questions & Answers

linux and irix on sgi

I have an SGI Indigo2 which I bought off of ebay. It has Irix 6.5.15, but I am really not happy with this architecture and the proprietariness of SGI. I have two hard drives. Is it possible to install Redhat Linux on the second drive and run it on the Indigo2? I used Unix in college a... (2 Replies)
Discussion started by: mdbanas
2 Replies
Login or Register to Ask a Question