Hi,
can someone tell me how to compile bash from a text file like kate?
I mean what is the command in the terminal once I'm in the root?
thanks
Hi,
can someone tell me how to compile bash from a text file like kate?
I mean what is the command in the terminal once I'm in the root?
thanks
Hi. Welcome to the forums.
I am a bit confused over your question. Do you mean to compile a program from the source code? Kindly elaborate.
Remember: With great power comes great current squared times resistance.
normally to compile bash, you would use
configure
make
make install
however if you want to compile your own program then (considering it is in c),
gcc /path/to/source/file -o output_file_name
other switches maybe applied as and when needed
If you are talking about BASH script itself, you can't compile it like like you would with a language such as C/C++. The reason for this is that it is interpreted language which gets translated into machine code at runtime.
.bashrc is a text file that tells bash how to look and behave.
MCP, A+/Linux+ Certified IT Technician
System Specs | Dress up your "Super Button" FREE
"If sometimes you can't be good, then be VERY good at being naughty!"
I mean I wrote some bash scripts in a text file
#!/bin/bash
case ...
..
and saved the file as .sh
I'm looking for the comand line to comile my .sh file?
thanks for your welcome message btw
Think carefully before executing commands containing "rm", especially "sudo rm -rf ", if you require more information concerning this matter, read this.
I am an experimenter, give me the most stable OS and I can make it unstable in a few hours.
C == seriously fast == FTW!
I would like to compile a .sh file(bash shell file)
You don't compile BASH script it is an interpreted language. You can execute it on the command line. You need to change it to be an executable before you run it which might be what you are asking.
To do this, if the file is called script.sh
The text file is now executable.Code:chmod 755 script.sh
I'm hoping this answers your question.
Last time on this one:
bash shell scripts are interpreted not compiled -- hence there is no reason to compile them.
If you want a personal .bash or .sh file, compose the file, save it, do the following:
chmod +x <xxxxx.sh>
Copy the file to your personal bin directory since this is in your path (you have to make the directory since its not included by default):
mkdir -p ~/bin
cp <shell_script_file.sh> ~/bin/<shell_script_file.sh>
Ok now you can run the shell script from the command line by simply typing
<shell_script_file.sh>
NO NEED TO COMPILE!!!
Bookmarks