Hi all.
I've not been around the list or at meetings recently as I've been
moving house, but that should all be done with by the end of March, so
I
should see you all soon.
I wonder if anyone can answer this question;
I've been trying to create a script which will alias a word with a
command with the simple line
#!/bin/bash -v
alias someword='/somepath/somecommand &'
Unfortunately when I list the aliases in the gnome-terminal window
after
having run the script, the alias does not exist.
I've also tried using
function someword() {
/somepath/somecommand &
}
but this has the same effect - it doesn't exist.
I've been able to create aliases and functions at the prompt, which
appear in the list no problem, and I've had a look at enable both at
the
prompt and inside shell scripts, and all is well.
Finally I tried using source to run another script, which works, but is
a bit messy and means having several files lying about.
Can anyone help?
Is there a special way to get an alias to work inside a script?
I'm using bash version 2.05b.0(1) inside Red Hat 8.