How to get Perl to run an alias that I defined in BASH?

I have a script that opens different files at the same time.

My problem is that when running system () in an alias that I defined in bash that points to / home / user 1 / Software / nc, perl tells me that it cannot execute the alias because it is not there file / directory at current location. I know that an alias works, because when I call it directly in the shell, it opens perfectly.

Funny, I can make the system ("firefox") in my script order, but not in an alias. How to use this alias in this script without breaking it?

+3
source share
3 answers

, , , bash , -i.

system('bash', '-i', '-c', 'shell command');
+1

Perl bash, .

bash -c your_command

Perl.

, . , @MortezaLSC. , , .

, perl? , , - , , . , .

, .. bash. Bash , Bash perl script? , . (perl script).

. :

+2
source

Does he work?

system 'bash -i -c "your alias parameter"';
0
source

All Articles