October 2000
Intermediate to advanced
1152 pages
26h 41m
English
Say you want to set up a number of aliases whenever you log on. Instead of typing all of the aliases every time you log on, you can put them in a file by using a text editor, such as vi, and then execute the file.
Here is what is contained in myenv, a sample file created for this purpose (for bash):
#!/bin/sh alias ll='ls -l' alias dir='ls' alias copy='cp'
myenv can be executed in a variety of ways under Linux.
You can make myenv executable by using the chmod command, as follows, and then execute it as you would any other native Linux command:
# chmod +x myenv
This turns on the executable permission of myenv. You need to ensure one more thing before you can execute myenv—it must be in the search path. ...
Read now
Unlock full access