[ale] command doesn't work from script, only command line...

Matt Shade mshade at threekay.com
Sat Dec 8 21:30:04 EST 2001


How about just using 'cd -'?

matt shade
www.threekay.com


----- Original Message -----
From: "Christopher Bergeron" <christopher at bergeron.com>
To: ale at ale.org
To: "Ale" <ale at ale.org>
Sent: Saturday, December 08, 2001 10:58
Subject: [ale] command doesn't work from script, only command line...


> Does anyone know why this command:
>
> cd `history | grep cd | grep -v grep | tail -n 2 | tail -n 1 | tr -s " " |
> cut -f 4 -d " "`
>
> works from the command line, but not from a [verbatim] shell script:
> #!/bin/bash
> cd `history | grep cd | grep -v grep | tail -n 2 | tail -n 1 | tr -s " " |
> cut -f 4 -d " "`
>
> I just named it p (for Previous) so I can switch to the directory I just
> came from.  It doesn't work though.  Any suggestions?
>
>
> ---
> This message has been sent through the ALE general discussion list.
> See http://www.ale.org/mailing-lists.shtml for more info. Problems should
be
> sent to listmaster at ale dot org.
>


---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be 
sent to listmaster at ale dot org.






More information about the Ale mailing list