Am 2008-01-26 17:19:04, schrieb Daniel Dickinson:
and other-script.sh has
#!/bin/bash
source ~/.bashrc
this is not needed, since the script is non-interactive
and source ~/.bashrc automaticaly
Thanks, Greetings and nice Day
Michelle Konzack
--
Linux-User #280138 with the Linux
Am 2008-01-26 16:48:18, schrieb T o n g:
Here is the full OP -- let me try for the last time:
???
An advanced bash alias expansion question --
How can I use my aliases or functions in my bash script?
I have the following alias and function defined in my ~/.bashrc:
$ alias rd
alias
On Tue, Jan 29, 2008 at 05:48:00PM +0100, Александър Л. Димитров wrote:
to be able to handle your daily work quicker. Aliases shouldn't be used in
shellscripts because:
a) it makes them more difficult to understand (aliases often have very
unintuitive names) for other people
Well, that's
Quoth William Pursell:
Another solution is to put the function and alias definitions
before the check for the interactive shell. I think that
a better solution is to define PS1 to fool the test as above,
but I don't think that is a particularly good solution either.
Probably better would be
Quoth T o n g:
On Sat, 26 Jan 2008 17:12:56 +, Tzafrir Cohen wrote:
I'm wondering if you have read my OP or not. Read it again pls.
Yes I have. Use functions. Don't use aliases.
Despite its limitations, why one can't use aliases in scripts?
This sounds like Don't use #define in C
On Sat, 26 Jan 2008 23:40:02 +, William Pursell wrote:
An advanced bash alias expansion question --
How can I use my aliases or functions in my bash script?
PS. I even tried the following but it didn't work either:
$ bash -O expand_aliases -c '. ~/.bashrc; (rd /tmp/ttt; alias rd;
On Sat, 26 Jan 2008 14:59:35 -0800, Andrew Sackville-West wrote:
Instead of complaining pointlessly, maybe you could have said
something like: . . .
Sorry about my attitude, I was very disappointed that I carefully wrote
the OP but nobody *seems* to read it carefully.
Thanks again to
On Sun, 27 Jan 2008 14:23:10 + (UTC)
T o n g [EMAIL PROTECTED] wrote:
On Sat, 26 Jan 2008 14:59:35 -0800, Andrew Sackville-West wrote:
[snip]
No. I don't want to go back into my archive of 20,000 d-u posts and
find your OP and read it in close detail now that we are several
levels
On Sun, Jan 27, 2008 at 02:23:10PM +, T o n g wrote:
On Sat, 26 Jan 2008 14:59:35 -0800, Andrew Sackville-West wrote:
Instead of complaining pointlessly, maybe you could have said
something like: . . .
Sorry about my attitude, I was very disappointed that I carefully wrote
the OP
On 27 Jan 2008, at 14:08, T o n g wrote:
On Sat, 26 Jan 2008 23:40:02 +, William Pursell wrote:
An advanced bash alias expansion question --
How can I use my aliases or functions in my bash script?
PS. I even tried the following but it didn't work either:
$ bash -O expand_aliases
On Wed, 23 Jan 2008 20:47:15 -0900, Ken Irving wrote:
I'm wondering if you have read my OP or not. Read it again pls.
source ~/.bashrc
Guess that I am having bad lucks now, having two people replied without
even reading my question, and the two replies are the only replies that I
get...
On Thu, Jan 24, 2008 at 03:55:51AM +, T o n g wrote:
I'm wondering if you have read my OP or not. Read it again pls.
Yes I have. Use functions. Don't use aliases.
--
Tzafrir Cohen | [EMAIL PROTECTED] | VIM is
http://tzafrir.org.il || a Mutt's
[EMAIL PROTECTED]
On Sat, 26 Jan 2008 17:12:56 +
Tzafrir Cohen [EMAIL PROTECTED] wrote:
On Thu, Jan 24, 2008 at 03:55:51AM +, T o n g wrote:
I'm wondering if you have read my OP or not. Read it again pls.
Yes I have. Use functions. Don't use aliases.
On command-line:
function dt () {
On Sat, Jan 26, 2008 at 12:44:42PM -0500, Daniel Dickinson wrote:
On Sat, 26 Jan 2008 17:12:56 +
Tzafrir Cohen [EMAIL PROTECTED] wrote:
On Thu, Jan 24, 2008 at 03:55:51AM +, T o n g wrote:
I'm wondering if you have read my OP or not. Read it again pls.
Yes I have. Use
On Sat, 26 Jan 2008 18:03:32 +
Tzafrir Cohen [EMAIL PROTECTED] wrote:
On Sat, Jan 26, 2008 at 12:44:42PM -0500, Daniel Dickinson wrote:
On Sat, 26 Jan 2008 17:12:56 +
Tzafrir Cohen [EMAIL PROTECTED] wrote:
On Thu, Jan 24, 2008 at 03:55:51AM +, T o n g wrote:
I'm
T o n g([EMAIL PROTECTED]) is reported to have said:
Hi,
A (adv) bash alias expansion question --
How can I use my aliases or functions in my bash script?
I have the following alias and function defined in my ~/.bashrc:
$ alias rd
alias rd='rmdir'
$ type dt
dt is a
On Sat, Jan 26, 2008 at 04:48:18PM +, T o n g wrote:
On Wed, 23 Jan 2008 20:47:15 -0900, Ken Irving wrote:
I'm wondering if you have read my OP or not. Read it again pls.
source ~/.bashrc
Guess that I am having bad lucks now, having two people replied without
even reading my
On Sat, 26 Jan 2008 13:32:57 -0800, Andrew Sackville-West wrote:
I'm wondering if you have read my OP or not. Read it again pls.
source ~/.bashrc
Guess that I am having bad lucks now, having two people replied without
even reading my question, and the two replies are the only
On Sat, 26 Jan 2008 12:44:42 -0500, Daniel Dickinson wrote:
./test.sh
Line 2 errors out. I imagine the same thing happens with his attempt
to use his bashrc-defined functions in a script without defining them
again in the script.
IIUC he wants to know how to use already defined
On Sat, 26 Jan 2008 17:12:56 +, Tzafrir Cohen wrote:
I'm wondering if you have read my OP or not. Read it again pls.
Yes I have. Use functions. Don't use aliases.
Despite its limitations, why one can't use aliases in scripts?
This sounds like Don't use #define in C to me (again, despite
On Sat, 26 Jan 2008 21:40:12 + (UTC)
T o n g [EMAIL PROTECTED] wrote:
On Sat, 26 Jan 2008 13:32:57 -0800, Andrew Sackville-West wrote:
I'm wondering if you have read my OP or not. Read it again pls.
source ~/.bashrc
Guess that I am having bad lucks now, having two people
Sigh... sorry I wasted your time.
You know those of us who voluntarily help out here are just that,
volunteers. We do it because we like to help and because we enjoy
problem solving. But, speaking for myself, I really only like to help
those who help us help them.
All you have done is post a
T o n g wrote:
On Wed, 23 Jan 2008 20:47:15 -0900, Ken Irving wrote:
An advanced bash alias expansion question --
How can I use my aliases or functions in my bash script?
PS. I even tried the following but it didn't work either:
$ bash -O expand_aliases -c '. ~/.bashrc; (rd /tmp/ttt;
T o n g wrote:
An advanced bash alias expansion question --
How can I use my aliases or functions in my bash script?
PS. I even tried the following but it didn't work either:
$ bash -O expand_aliases -c '. ~/.bashrc; (rd /tmp/ttt; alias rd; dt bin;
type dt)'
The point of my previous
Hi,
A (adv) bash alias expansion question --
How can I use my aliases or functions in my bash script?
I have the following alias and function defined in my ~/.bashrc:
$ alias rd
alias rd='rmdir'
$ type dt
dt is a function
dt ()
{
pushd +$1
}
How can I use them in my
On Wed, Jan 23, 2008 at 11:10:13PM +, T o n g wrote:
Hi,
A (adv) bash alias expansion question --
How can I use my aliases or functions in my bash script?
I have the following alias and function defined in my ~/.bashrc:
$ alias rd
alias rd='rmdir'
$ type dt
dt is a
On Wed, 23 Jan 2008 23:21:37 +, Tzafrir Cohen wrote:
I have the following alias and function defined in my ~/.bashrc:
$ alias rd
alias rd='rmdir'
$ type dt
dt is a function
dt ()
{
pushd +$1
}
How can I use them in my script? . . .
So just use
On Thu, Jan 24, 2008 at 03:55:51AM +, T o n g wrote:
On Wed, 23 Jan 2008 23:21:37 +, Tzafrir Cohen wrote:
I have the following alias and function defined in my ~/.bashrc:
$ alias rd
alias rd='rmdir'
$ type dt
dt is a function
dt ()
{
pushd +$1
28 matches
Mail list logo