R
R
Russian Cheese2019-03-01 14:39:14
linux
Russian Cheese, 2019-03-01 14:39:14

How to add a command in linux (Termux) that will execute the command?

Let me explain:
I write start and php file_path\file.php is launched for me
How to do this?
If it somehow affects, then it's in Termux

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Talyan, 2019-03-01
@flapflapjack

Create a BASH script and that's it.
An analogue of a bow in Windows.
If to be executed from any place, it seems to be necessary to put it in /usr/bin. As an option

V
Victor Taran, 2019-03-01
@shambler81

1. put the file that you are going to run into the bin (the extension does not exist in Linux, it's just part of the file) so you can name it vasya
2. put your php code inside
3. in the first line put this
#!/usr/local/bin /php
Well, or where you have php itself
4. make the file executable chmod 700 (launchable in Linux attribute)
everything, the file will start and the first line will tell you how to interpret.
do not forget that for Linux there is no difference in interpreters, it’s just that sh is the default, but no one forbids you to set C or php by default, so who will draw the conclusion to Linux is generally purple, whoever you call that ace.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question