Part of Slepp's ProjectsPastebinTURLImagebinFilebin
Feedback -- English French German Japanese
Create Upload Newest Tools Donate
Sign In | Create Account

Advertising

advertising

related pastes to tag 'bash'

2135800 - Mine: bash
  1. #!/bin/bash
  2.  
  3. for f in *; do
  4.                 if [ -d "$f" ]; then
  5.                                 echo "$f is directory";
  6.                 else
  7.                                 echo "$f:";
  8.                                 head -n 4 "$f";
  9.  
2122552 - Liz Quilty: script apache bash check headers
  1. #!/bin/bash
  2. if [ $1 ];then
  3.         SITENAME=$1
  4.         exec 3<> /dev/tcp/${1:-$SITENAME}/80
  5.         printf "GET / HTTP/1.0\r\n" >&3
  6.         printf "Accept: text/html, text/plain\r\n" >&3
  7.         printf "Accept-Language: en\r\n" >&3
  8.         printf "User-Agent: nixCraft_BashScript v.%s\r\n" "${BASH_VERSION}" >&3
  9.  
2107668 - script meteo bash: scripts bash meteo
  1. *** Fichier meteo.sh ***
  2.  
  3.  
  4. #!/bin/bash
  5.  
  6. set -xv
  7.  
  8. ########################################################################
  9.  
2000868 - Jecesyassaurf bash bashrc msys
preview unavailable
1987526 - SlackBuild automation script: script bash slackbuild
  1. #!/bin/bash
  2. # SBO - SlackBuild automation script.
  3. # dagni, 2010-11-10, thanks to guys from ##slackware ;)
  4. #####################################
  5.  
  6. version="0.1"
  7. link="$1"
  8. function sbo_usage() {
  9.  
1917151 - Tomatoe.sh: timer bash pomodoro
  1. #!  /usr/bin/env bash
  2. #   File:            tomatoe.sh
  3. #   What the..?:     A simple timer to apply The Pomodoro Technique.
  4. #   Who  the..?:     ksaver (at identi.ca).
  5. #   Why? :           In the Hope of this little script can be useful...
  6. #   When?:           July 2010.
  7. #   Requieres:       bash, play, zenity (nix like OS, of course).
  8. #   More Info:       http://www.pomodorotechnique.com
  9.  
1866704 - svn ressurection: svn bash
  1. svnresurrect() {
  2. found=0
  3. empty=""
  4. listofrevs=`svn log | grep -o --regexp="^r[0-9]*" | sed "s/r//g"`
  5. for i in $listofrevs;
  6. do
  7. echo $i
  8.         thisrev=`svn log -v -r $i | grep "^ *D [/A-Za-z0-9]*$1$"`
  9.  
1821812 - Change your Twitter profile pict: curl bash twitter api
  1. #!/bin/bash
  2.  
  3. # default parameters (change where needed))
  4. dir=/path/to/your/pictures
  5. usr=username
  6. pwd=password
  7.  
  8. # choose a random file
  9.  
1821810 - Change your Twitter profile pict: curl bash twitter api
  1. #!/bin/bash
  2.  
  3. # default parameters (change where needed))
  4. @@dir=/path/to/your/pictures
  5. @@usr=username
  6. @@pwd=password
  7.  
  8. # choose a random file
  9.  
1821808 - Change your Twitter profile pict: curl bash twitter api
  1. #!/bin/bash
  2.  
  3. # default parameters (change where needed))
  4. dir=/path/to/your/pictures
  5. usr=username
  6. pwd=password
  7.  
  8. # choose a random file
  9.  
1657983 - drop: shell bash dropbox
  1. #!/bin/sh
  2.  
  3. # No args, copy the current directory to your dropbox
  4. if [[ x"$1" = x ]]; then
  5.     cp -R . ~/Dropbox/${PWD##*/}
  6.  
  7. # Copy all given filenames to your dropbox
  8. else
  9.  
1621070 - Unnamed bash bashrc msys
preview unavailable
1612486 - hakushka@worldpress.com: bash
  1. #!/bin/sh
  2. # defrag v0.07 by Con Kolivas <kernel@kolivas.org
  3. # Braindead fs-agnostic defrag to rewrite files in order largest to smallest
  4. # Run this in the directory you want all the files and subdirectories to be
  5. # reordered. It will only affect one partition.
  6. # Are you really crazy enough to be using this? It might blow your data
  7. # into tiny little useless chunks.
  8. #
  9.  
1612481 - hakushka@worldpress.com: bash
  1. #!/bin/sh
  2. # defrag v0.06 by Con Kolivas <kernel@kolivas.org>
  3. # Braindead fs-agnostic defrag to rewrite files in order largest to smallest
  4. # Run this in the directory you want all the files and subdirectories to be
  5. # reordered. It will only affect one partition.
  6. #
  7. # улучшен haku
  8.  
  9.  
1612458 - hakushka@worldpress.com: bash
  1. #!/bin/bash
  2. INPUT="$1"
  3. OUTPUT="$2"
  4.  
  5. MP4BOX="$(which MP4Box 2>/dev/null)"
  6. MPLAYER="$(which mplayer 2>/dev/null)"
  7. MENCODER="$(which mencoder 2>/dev/null)"
  8.  
  9.  
1606656 - check_nbu_pool: bash nagios netbackup plug-in icinga
  1. #!/bin/bash
  2.  
  3. # Based on a script from "Jurry"
  4. # -> http://jurrys.blogspot.com/2008/09/nagios-plug-in-for-netbackup-scartch.html
  5.  
  6. # Changes by Alexander Skwar <alexander@skwar.name>:
  7. # 2009-10-09:
  8. # - Allow the user to specify the name of the pool which is to be checked
  9.  
1606560 - check_nbu_pool: bash nagios netbackup plug-in icinga
  1. #!/bin/bash
  2.  
  3. # Based on a script from "Jurry"
  4. # -> http://jurrys.blogspot.com/2008/09/nagios-plug-in-for-netbackup-scartch.html
  5.  
  6. # Changes by Alexander Skwar <alexander@skwar.name>:
  7. # 2009-10-09:
  8. # - Allow the user to specify the name of the pool which is to be checked
  9.  
1606525 - check_nbu_pool: bash nagios netbackup plug-in icinga
  1. #!/bin/bash
  2.  
  3. WARN_COUNT=$1
  4. CRIT_COUNT=$2
  5.  
  6.  
  7. SCRATCH_TMP=`/usr/openv/volmgr/bin/vmquery -b -pn Scratch_pool | wc -l`
  8. SCRATCH_COUNT=$[$SCRATCH_TMP - 3]
  9.  
1595110 - Anonymous: shell bash
  1. leonardo@zylle:~$ cat /etc/profile
  2. # /etc/profile: This file contains system-wide defaults used by
  3. # all Bourne (and related) shells.
  4.  
  5. # Set the values for some environment variables:
  6. export MINICOM="-c on"
  7. export MANPATH=/usr/local/man:/usr/man
  8. export HOSTNAME="`cat /etc/HOSTNAME`"
  9.  
1524953 - usacycleIlles bash bashrc msys
preview unavailable
1511641 - pierce.jason: bash case block dynamic
  1. #!/bin/bash
  2. input="$1";
  3.  
  4. qwerty_response='ls';
  5.  
  6. block_start=\
  7. 'case "$input" in
  8.         "asdf")   echo "asdf1" ;;'
  9.  
1510407 - sshd daemon watcher: linux script shell bash monitor sshd
  1. #!/bin/bash
  2. declare SSHD_PID="/var/run/sshd.pid"
  3. declare SSHD_SERVICE="/etc/rc.d/rc.sshd"
  4. # for debugging...
  5. # SSHD_SERVICE="echo"
  6. declare SSHD_RESTART="${SSHD_SERVICE} restart"
  7. declare SSHD_STOP="${SSHD_SERVICE} stop"
  8. declare SSHD_START="${SSHD_SERVICE} start"
  9.  
1510402 - sshd daemon watcher: linux script shell bash monitor sshd
  1. #!/bin/bash
  2. declare SSHD_PID="/var/run/sshd.pid"
  3. declare SSHD_SERVICE="/etc/rc.d/rc.sshd"
  4. # for debugging...
  5. # SSHD_SERVICE="echo"
  6. declare SSHD_RESTART="${SSHD_SERVICE} restart"
  7. declare SSHD_STOP="${SSHD_SERVICE} stop"
  8. declare SSHD_START="${SSHD_SERVICE} start"
  9.  
1470628 - dellioppy bash bashrc msys
preview unavailable
1467965 - bashrc: bash terminal bashrc prompt
  1. # Check for an interactive session
  2. [ -z "$PS1" ] && return
  3.  
  4. alias ls='ls --color=auto'
  5.  
  6. # PS1
  7. OnColor='\[\e[0;33m\]'
  8. OnDefault='\[\e[0m\]'
  9.  
1465656 - wrollaEramton bash bashrc msys
preview unavailable
1451716 - atrowly bash bashrc msys
preview unavailable
1449926 - sweadly bash bashrc msys
preview unavailable
1448307 - sweadly bash bashrc msys
preview unavailable
1446943 - sweadly bash bashrc msys
preview unavailable
1442274 - gnu_d: script bash text format voice awk espeak hms hhmmss
  1. txt="`echo "$txt" | awk -F':' '{
  2.         if($1!="") printf("%s", $1 " hour ");
  3.         if($2!="") printf("%s", $2 " minute ");
  4.         if($3!="") printf("%s", $3 " seconds");
  5.                 }'`";
  6.         }
1441574 - Anagavape bash bashrc msys
preview unavailable
1440402 - bashrc bash bashrc msys
preview unavailable
1437899 - bashrc bash bashrc msys
preview unavailable
1436094 - knocuourn bash bashrc msys
preview unavailable
1430705 - Buhchatte bash bashrc msys
preview unavailable
1429604 - Thonest bash bashrc msys
preview unavailable
1427864 - anargymog bash bashrc msys
preview unavailable
1343252 - .bashrc: bash terminal bashrc prompt
preview unavailable
1331063 - bash to keep a script looping: bash loop
  1. #!/bin/bash
  2.  
  3. # a shell script that keeps looping until an exit code is given
  4.  
  5. # if it's a 0, immediatly restart
  6. # if it's an error, pause, then restart
  7. # and one particular code, exit cleanly.
  8.  
  9.  
1307626 - .bashrc: bash terminal bashrc prompt
preview unavailable
1263722 - AppleTV Downgrade to 2.1: bash appletv downgrade osupdade
  1. #!/bin/bash
  2. #-------------------------------------------------------------------
  3. # BASH Script for Apple TV to Downgrade to ver 2.1
  4. #-------------------------------------------------------------------
  5. #
  6. mkdir /User/frontrow/OStemp
  7. rm /User/frontrow/OStemp/*
  8. cd /Users/frontrow/OStemp/
  9.  
1222759 - SQL-BashScript: menu sql script shell bash execution
  1. #!/bin/bash
  2. #
  3. # SQL Shell Execution Menu Bash Script
  4. #
  5. # by Mike Jans mailto: infos[At]bash[DoT]ch
  6. #
  7. ############################################
  8.  
  9.  
1198483 - santa claus is coming to town: bash santa
  1. better !pout !cry
  2. better watchout
  3. lpr why
  4. santa claus < north pole > town
  5.  
  6. cat /etc/passwd > list
  7. ncheck list
  8. ncheck list
  9.  
1072882 - MacPorts recursive dependency re: bash macports
  1. #!/bin/bash
  2. #
  3. # Outputs dependencies for MacPorts recursivly, each port and its dependencies
  4. # in a separate line.
  5. #
  6. # Usage: ./deepdeps.sh <portname>
  7. #
  8. # (c) Thomas Keller <me@thomaskeller.biz>
  9.  
1046584 - newpkg 1.0: bash archlinux
  1. #!/bin/bash
  2. # vim: set ts=8 fdm=marker :
  3.  
  4. BASEDIR="${HOME}/builds"
  5. PROTODIR='/usr/share/pacman'
  6.  
  7. ###
  8. # Lines below this point should not need to be edited.
  9.  
995599 - ssh script: bash ssh controlmaster controlpath
  1. #!/usr/local/bin/bash
  2.  
  3. # Tue Oct  2 04:37:30 CEST 2007 eak!
  4.  
  5. if [ -z "$1" ]; then
  6.   exit 255
  7. fi
  8.  
  9.  
977723 - Bash script: script bash grep varlogmessages
  1. root@starchild:/tmp# cat fwlogsearch2.sh
  2. #!/bin/bash
  3.  
  4. # Searches FW logs on Linode, which are contained in /var/log/messages* files
  5.  
  6.         function search {
  7.                 local ip  #ip is local to the function
  8.                 echo "Searching... "
  9.  
815719 - shell scopes sh shell bash loop while
preview unavailable
753888 - bashrc bash bashrc msys
preview unavailable
687288 - andarius: bash
  1. #!/bin/sh
  2. # I used a sample file named "out" to test this.
  3. # I did not verify the math. you may want to check
  4. # it the first pass to be sure.
  5. #
  6. # This is likely more complex than it needs to be,
  7. # however I am no scripting pro. Just like a trying
  8. # things.
  9.  
687085 - shELLit: sh bash stdout
  1. 0[15:42:54]toto:~$ ps axuww | tee /dev/stdout | ( head -n 1 && grep httpd )
  2. USER      PID %CPU %MEM   VSZ    RSS TT  STAT STARTED      TIME COMMAND
  3. www      5069  0.0  0.5  3756   1840 ??  I    12:00AM   0:00.01 /usr/pkg/sbin/httpd -k start
  4. www      5483  0.0  0.5  3756   1840 ??  I    12:00AM   0:00.00 /usr/pkg/sbin/httpd -k start
625281 - ipfailover: script bash ip failover ovh
  1. #!/bin/bash
  2. #configuration des IP Fail Over
  3. # 91.121.58.69
  4. ifconfig dummy0 91.121.58.69 netmask 255.255.255.255
  5. # 91.121.58.66
  6. ifconfig dummy0:1 91.121.58.66 netmask 255.255.255.255
  7. # 91.121.58.67
  8. ifconfig dummy0:2 91.121.58.67 netmask 255.255.255.255
  9.  
fantasy-obligation