mkdir apache mkdir apache/bin mkdir apache/conf mkdir apache/lib mkdir www mkdir www/html mkdir www/cgi-bin mkdir www/ftp chmod -R 755 apache chmod -R 750 www chmod -R 771 www/ftp touch apache/bin/httpd chmod 755 apache/bin/httpd touch www/html/index.html chmod 644 www/html/index.html chmod 711 www/cgi-bin/process.pl cat > apache /conf/httpd.conf # # This is the main Apache HTTP server configuration file. It contains the # configuration directives that give the server its instructions. # Do not add a slash at the end of the directory path. # ServerRoot "usr" # # DocumentRoot: The directory out of which you will serve your documents. # DocumentRoot "/Library/WebServer/Documents" chmod 664 apache/conf/httpd.conf cat apache/conf/httpd.conf grep -e "ServerRoot" -e "DocumentRoot" apache/conf/httpd.conf cd www sed "s_/Library/WebServer/Documents_`pwd`_g" apache/conf/httpd.conf awk -F":" '{print $1, "-", $6}' /etc/passwd
Write, Run & Share Bash code online using OneCompiler's Online Bash Shell for free. It's one of the robust, feature-rich Bash shell available over online and getting started with the OneCompiler's Bash Shell is simple and pretty fast. The editor shows sample boilerplate code when you choose language as Bash
. OneCompiler also has reference scripts, where you can look for the sample scripts and start coding.
Bash (Bourne Again Shell) is a shell program written by Brian Fox and is an upgraded version of Bourne Shell program 'sh'.
name="Foo"
echo $name
echo "$name"
echo "${name}"
if [ conditional-expression ]
then
statements
fi
if [ conditional-expression ]
then
statements
else
statements
fi
if [ conditional-expression ]
then
statements
elif [ conditional-expression ]
then
statements
else
statements
fi