termux / termux-app

Termux - a terminal emulator application for Android OS extendible by variety of packages.
https://f-droid.org/en/packages/com.termux
Other
35.58k stars 3.73k forks source link

[Bug]: How do I fix this mistake error (Github version) #4007

Closed reeaosirjustsir closed 4 months ago

reeaosirjustsir commented 4 months ago

Problem description

<@722419788034474004> When i execute my own bin files, I get this happened mistake error.

Here the my own bin files (Not sharing my own bin files to other user, It's results before execute): `#!${PREFIX}/bin/bash Y="$(printf '\033[1;33m')" G="$(printf '\033[1;32m')" R="$(printf '\033[1;31m')"

Input questions

clear function input_questions() { read -p "Enter your directory: " my_dir

}

Checking the directory

function check_directory_message() { echo -e "${Y} Checking directory......."

}

function complete_check_directory_message() { echo -e "${G} Your directory has existed."

}

function error_check_directory_message() { echo -e "${R} Your directory has ain't existed"

}

function check_directory() { check_directory_message echo -ne '##### (33%)\r' sleep 1 echo -ne '############# (66%)\r' sleep 1 echo -ne '####################### (100%)\r' echo -ne '\n' clear if (( command -f ${my_dir} )); then complete_directory_message else error_directory_message fi sleep 3 clear

}

Listing directory

function error_directory_message() { if (( command -v figlet )); then figlet "${R} [ERROR]" elif (( command -v cowsay )); then cowsay "${R} [ERROR]" else echo -e "${R} [ERROR]" fi

}

function list_directory() { if (( command -v tree )); then tree ${my_dir} elif (( command -v dir )); then dir ${my_dir} elif (( command -v ls )); then ls -a ${my_dir} else error_directory_message fi

}

Function collection

function function_collection() { input_questions check_directory list_directory

}

function_collection`

Carefully send me your mistakenly solution idea. 👀

Screenshot_2024-06-10-20-21-59-27_84d3000e3f4017145260f7618db1d683

Steps to reproduce the behavior.

[Planned as discord version]

What is the expected behavior?

[Planned as discord version]

System information

twaik commented 4 months ago

No need to ask the same question in different places. I already answered you in discord. Quoting it.

reeaosirjustsir commented 4 months ago

No need to ask the same question in different places. I already answered you in discord. Quoting it.

  • AFAIK You can not use environment variables in shebang. Put the whole path to bash.
  • I do not see nala mentions in the script. I have no idea where you got this and what it needs.

But i need our same question for collection post (not from Termux discord server) before i retire Ubuntu Hideout's suggestion for new Debian-based Linux distro's Discord server illegally.

reeaosirjustsir commented 4 months ago

Also what mistakenly correctly does putting whole path to my own bin files meaning?.

twaik commented 4 months ago

Your messages do not have any sense. If you are using some weird translator application you should switch to Google Translate.

sylirre commented 4 months ago

@reeaosirjustsir Are you trying to gather attention by referencing your issue in other, unrelated tickets?