How do you use an alias in a script?

Đức Linh

New member
How do you use an alias in a script?
Answer
11 Answers
  1. In your shell script use the full path rather then an alias.
  2. In your shell script, set a variable, different syntax petsc=’/home/your_user/petsc-3.2-p6/petsc-arch/bin/mpiexec’ $petsc myexecutable.
  3. Use a function in your script. …
  4. Source your aliases shopt -s expand_aliases source /home/your_user/.bashrc.
 

Tìm kiếm

Back
Top