11
3
I have a .bashrc file, which I want to setup so it reads aliases from an .aliases file and sets them up.
Currently I have:
# User specific aliases and functions
while read alias_line
do
echo `alias ${alias_line}`
done < .aliases
But upon login I get:
-bash: alias: -fu: not found -bash: alias: $USER": not found
-bash: alias: -lart": not found
The .aliases file is like this:
psu="ps -fu $USER" ll="ls -lart"
pico='nano'
That's right. It was a completely wrong approach. I did it myself using these commands:
while read line; do echo "alias $line" >> .aliases_full; done < .aliases I then just did
mv .aliases_full .aliases . ./.aliases #in .bashrc Thanks anyway :) – Vladimir – 2011-09-04T13:22:55.643