What do you want to save?
Add Code snippet
New code examples
-
Shell/Bash 2022-02-18 17:25:02
bash script wget
#!/bin/sh # Linux wget=/usr/bin/wget tar=/bin/tar apachectl=/usr/sbin/apache2ctl # FreeBSD #wget=/usr/local/bin/wget #tar=/usr/bin/tar #apachectl=/usr/local/sbin/apachectl TXT="GOT TO THE END, YEAH" WORKING_DIR="/var/asl/updates" TA... Add solution -
Shell/Bash 2022-02-17 21:30:11
bash storing and getting global variables between shells
#!/bin/bash global_export () { { flock 0 #prevents process fork when active set -x #enables verbose/debug . /tmp/env [ $# -eq 0 ] || export "$@" echo "$@" KEY=`echo "$@" | awk '{split($0,a,"=&q... Add solution -
Shell/Bash 2022-02-13 15:15:13
ubuntu restart network manager when ping is low
start on started network-manager stop on runlevel [016] script while true; do if ifconfig eth0 | grep -q "inet addr:"; then # echo "all ok!" else restart network-manager fi sleep 5 done end script Add solution -
Shell/Bash 2021-10-12 01:35:05
shell sh if passwords not equal
Codeecho "enter the password" read password len="${#password}" if test $len -ge 8 ; then echo "$password" | grep -q [0-9] if test $? -eq 0 ; then &nb... Add solution -
Shell/Bash 2021-08-31 18:14:02
linux bash export vars between shell instances
export_global_var () { filename=/tmp/env test -f $filename || touch $filename { flock 0 #prevents isssues with multi thread process #set -x #enables verbose/debug . /tmp/env [ $# -eq 0 ] || export "$@" echo "$@&q... Add solution -
Shell/Bash 2021-08-30 04:34:01
what is shell scripting
#!/bin/bash # Name: Check for domain name availability # linuxconfig.org # Please copy, share, redistribute and improve if [ "$#" == "0" ]; then echo "You need tu supply at least one argument!" exit 1 fi ... Add solution
Best helpers
Ranking is empty