Jan-23-2024, 06:44 PM
(Jan-23-2024, 09:19 AM)Pedroski55 Wrote: This little Python:
#! /usr/bin/python3 #This program says hello and asks for your name. print('This is Python speaking: Hello World') print('What is your name?') #Ask for their name. myName = input() print('It is good to meet you,' + myName)can run in bash by creating a bash script like this:
Quote:echo "This is bash speaking, I am now starting hello_world.py"
myPython/helloWorld.py
Make sure the script and the bash script are executable. I have the path for my bash scripts in my $PATH, /home/pedro/myBashscripts, so bash always finds them.
Don't forget the shebang: /usr/bin/python3 or bash and the computer go very weird!
I'm not quite understand. It mean i need to create new bash script and run it on linux terminal?