A
A
avion2020-07-29 18:25:54
linux
avion, 2020-07-29 18:25:54

Alias ​​in linux scripts?

Hello, why doesn't alias work in scripts? I run the script, for example, with alias ll="ls -l", but after executing it, no new alias is added. What could be the problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Saboteur, 2020-07-29
@avion123678

Aliases only work in interactive shell mode.
When run in scripts, they will not work.
If you need, use functions - they can also replace alias and will work in scripts

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question