I investigated more last night and the problem isn’t about the shebang but about the environmental variable. A line was missing in the book and I thought that adding the shebang could let your run the script without having to enter the path to the script.
Anyway I learned new things.
I know how to enter it in the $PATH variable and through the ~/.bash_profile so I can run the script without having to enter the path, but the question is, which is another topic, how can I do it automatically for other people so they can run the script without having to enter the path if I give it to them, juste as programs like Nmap.
which -a bash gives me:
But none of these worked
My file is executable at all level of users
I’m pretty sure the problem is about the path and not the shebang line on the editor because the command is recognised.
I looked at the man page for env and tried the
Which gave me a lot of informations like the path for the shell:
(but this one didn’t work) and other arguments.
So at this time I can execute the file without entering bash but I have to specify the path to it, even if I’m in the correct folder.
bash : unknown command
I now use Atom to write the program but it doesn’t work.
I tried almost every path I found in the $PATH variable:
I’ve learned how to run a program I wrote without using the command bash from the book The Unix Workbench by making the file executable, which I did, and writing the shebang on the first line of the script:
It more or less worked during the example but when I tried to do the same on one of my own script using nano for writing it didn’t worked.
I also have to do it for python 3.7 scripts, which seems to be harder to make it works. The example I found on the python website was:
Could someone explain me how this part of the script works and give me an example that I can apply?
Job done, I can reach now Windows 7 and Antergos is reinstalled.
I tried with Etcher, my USB stick isn’t recognised in the manual boot menu but if I reorder correctly in the BIOS I can reach Antergos automatically.
This is the same USB stick as I used to install Antergos 17.12 the first time but now there is a problem between the asset (Antergos 18.3) and USBWriter which Etcher can pass out.
- I created it with USBWriter for Windows as the tutorial on the Antergos website
It worked perfectly fine for the first installation.
- I effectively encountered some discussions on the web about the EFI/BIOS but didn’t checked that because I don’t know where to find it, but into the BIOS:
QUIET BOOT [ENABLED]
NETWORK BOOT [ENABLED]
D2D RECOVERY [ENABLED]
SATA MODE [AHCI MODE]
PASSWORD ON BOOT [DISABLED]
And all password are cleared.
These are the main informations I think you asked for and I have access to into the BIOS menu and tabs. I didn’t changed anything by myself into the BIOS (except the boot order) nor updated Windows 7 since the first installation of Antergos.
I need to reinstall Antergos and encouter problems.
I formatted the partitions of Antergos (which are the two last ones, Windows 7 are the first) on my Windows 7/Antergos computer without fixing the boot file and now I’m stuck into Grub Rescue mode when I boot (unknown filesystem). I first wanted to go back to Windows 7 to fix the file, clean the partition in RAW (I formatted in NTFS) and then reinstalled Antergos.
I know I broke a part of the bridge by erasing Antergos and keeping Grub booting the system but I thought Grub would be erased also.
I tried a lot of possibilities I found on the web but they didn’t work:
- Boot from Grub Rescue on each (hd,msdos)
- Burning Windows 7 ISO to reach the prompt (which I did with ISO Image Burner 1.1 on a DVD but it didn’t boot, maybe I didn’t choose the right parameters like a cache size or volume ID or the right boot image. I also tried it with a USB key with USBWriter)
- Using Super Grub 2 Disk (which I did with ISO Image Burner 1.1 but it didn’t boot, neither with a USB key with USBWriter and I didn’t found Super Grub 0.9)
The only step forward is a bootable UBS key on which I can access the first Antergos menu, but problems happen:
When I choose Antergos Live the Linux kernel loads 100% but then the script is looping on the Antergos logo screen, nothing more happen but it is not freezing.
If I choose to boot from the hard disk in the menu it comes back to the menu quickly in loop over and over again until I choose something else.
If I choose the non-graphical boot it loads me the Linux kernel 100% and then comes to the prompt:
I’m doing this with the 18.3 version and wanted to download back the 17.8 version to try if it could work better (the version I first installed), but I can’t do it on the website and I didn’t backup the file and it is stuck on my Windows 7 session.
Thanks for your support,