proper bash interpreter initialization

This commit is contained in:
Fabien Benetou
2011-07-14 02:01:00 +02:00
parent 8bc2cf1b2e
commit 08e19d2a2b
29 changed files with 29 additions and 29 deletions

2
shell_scripts/con_restart Executable file → Normal file
View File

@@ -1,3 +1,3 @@
#!/bin/sh
#! /usr/bin/env bash
CON=`nmcli con list | grep wireless | sed "s/ .*//"`
nmcli con down id $CON && nmcli con up id $CON

2
shell_scripts/downloads_to_watch_later Executable file → Normal file
View File

@@ -1,3 +1,3 @@
#!/bin/sh
#! /usr/bin/env bash
RATE=50k
wget -c --limit-rate=$RATE -i ~/to_download_and_watch

2
shell_scripts/error_search Executable file → Normal file
View File

@@ -1,4 +1,4 @@
#!/bin/sh
#! /usr/bin/env bash
if [ $# -lt 1 ]
then
echo "usage: my_failing_cmd 2>&1 > /dev/null | error_search"

2
shell_scripts/export_shared_links_per_person Executable file → Normal file
View File

@@ -1,3 +1,3 @@
#!/bin/sh
#! /usr/bin/env bash
# if no $1 then ask for person name
grep $1 ~/sharedlinks | sed "s/$1 //" | sed "$ s/^/<html><table><tr><td>/" | tac | sed "$ s/$/<\/table><\/html>/" | sed "s/^/<tr><td>/" | sed "s/^\(.*\) +0200 \(.*\)/\1<\/td><td>\2/" | sed "s/http\([^ ]*\)/<a href=\"http\1\">http\1<\/a>/g" | sed "s/$/<\/td><\/tr>/" > ~/web/benetou.fr/fabien/pub/sharedlinks/$1.html

2
shell_scripts/gallery_making Executable file → Normal file
View File

@@ -1,4 +1,4 @@
#!/bin/sh
#! /usr/bin/env bash
# consider using convert to generate thumbnails and auto-rotate
echo "<html>" > gallery.html && ls *.jpg *.JPG |sort -n| sed "s/\(.*\)/<a href=\"\1\"><img height=\"200px\" src=\"\1\"\/>\1<\/a><br\/>/" > gallery.html && echo "</html>" >> gallery.html

2
shell_scripts/gm_reverting_irc_logs_links Executable file → Normal file
View File

@@ -1,4 +1,4 @@
#!/bin/sh
#! /usr/bin/env bash
# http://fabien.benetou.fr/Tools/Greasemonkey#RevertedPIMLinks
# TODO
# properly declare

2
shell_scripts/gm_reverting_pim_links Executable file → Normal file
View File

@@ -1,4 +1,4 @@
#!/bin/sh
#! /usr/bin/env bash
# http://fabien.benetou.fr/Tools/Greasemonkey#RevertedPIMLinks
# TODO
# properly declare

2
shell_scripts/last_tweeters_account_on_logname Executable file → Normal file
View File

@@ -1,2 +1,2 @@
#!/bin/sh
#! /usr/bin/env bash
curl http://search.twitter.com/search?q=$LOGNAME | grep profile | sed "s/.*com\/\(.*\)\" onclick.*/http:\/\/twitter.com\/\1/" | grep -v $LOGNAME | sort | uniq

2
shell_scripts/most_used_commands Executable file → Normal file
View File

@@ -1,4 +1,4 @@
#!/bin/sh
#! /usr/bin/env bash
AVOID="con\|utopiah@benetou.fr"
echo consider also http://fabien.benetou.fr/Tools/ and exercises

2
shell_scripts/mytasks Executable file → Normal file
View File

@@ -1,4 +1,4 @@
#!/bin/sh
#! /usr/bin/env bash
# learn more about cron, at and batch
## note that at also requires to specify the DISPLAY

2
shell_scripts/ratp_now Executable file → Normal file
View File

@@ -1,4 +1,4 @@
#!/bin/sh
#! /usr/bin/env bash
if [ $# -lt 2 ]
then
echo 'usage ratp_now "la varenne-chennevieres (RER)" "gare de l est (SNCF), paris"'

2
shell_scripts/recently_modified_etc_configs Executable file → Normal file
View File

@@ -1,2 +1,2 @@
#!/bin/sh
#! /usr/bin/env bash
find /etc/ -mtime -1 -name *.conf

2
shell_scripts/social_behavior_distribution Executable file → Normal file
View File

@@ -1,4 +1,4 @@
#!/bin/sh
#! /usr/bin/env bash
# http://fabien.benetou.fr/Tools/Irssi#LogsSocialBehaviors
if [ $# -lt 1 ]

2
shell_scripts/social_grep Executable file → Normal file
View File

@@ -1,4 +1,4 @@
#!/bin/sh
#! /usr/bin/env bash
# http://fabien.benetou.fr/Tools/Shell#Scripting
# shell prototype
# if 0 args display help

2
shell_scripts/tunkranker Executable file → Normal file
View File

@@ -1,3 +1,3 @@
#!/bin/sh
#! /usr/bin/env bash
# generalize via a parameter, default back to USER
curl http://tunkrank.com/refresh/utopiah.json && curl http://tunkrank.com/score/utopiah.json >> ~/web/benetou.fr/fabien/pub/socialbehaviors/tunkrank_utopiah.txt && echo "" >> ~/web/benetou.fr/fabien/pub/socialbehaviors/tunkrank_utopiah.txt

2
shell_scripts/videolectures_rtmpdump_warper Executable file → Normal file
View File

@@ -1,4 +1,4 @@
#!/bin/sh
#! /usr/bin/env bash
# http://fabien.benetou.fr/Tools/Tools#RTMPDump
if [ $# -lt 1 ]
then

2
shell_scripts/wiki_average_words_per_diff Executable file → Normal file
View File

@@ -1,4 +1,4 @@
#!/bin/sh
#! /usr/bin/env bash
# takes are argument the wiki root

2
shell_scripts/wiki_contribution_distribution Executable file → Normal file
View File

@@ -1,4 +1,4 @@
#!/bin/sh
#! /usr/bin/env bash
#if not in wiki.d/ via pwd or parameter
##then display help

2
shell_scripts/wiki_diff_distribution Executable file → Normal file
View File

@@ -1,4 +1,4 @@
#!/bin/sh
#! /usr/bin/env bash
# to use in wiki root
## XXX this is not consistent with some other commands

2
shell_scripts/wiki_link_checking Executable file → Normal file
View File

@@ -1,4 +1,4 @@
#!/bin/sh
#! /usr/bin/env bash
# http://fabien.benetou.fr/Wiki/ToDo#Maintenance
# TODO
# generalize for other URLs

2
shell_scripts/wiki_list_content Executable file → Normal file
View File

@@ -1,4 +1,4 @@
#!/bin/sh
#! /usr/bin/env bash
#to be done in the root of the wiki
for X in $(ls $1/wiki.d);

2
shell_scripts/wiki_oldest_mentions Executable file → Normal file
View File

@@ -1,4 +1,4 @@
#!/bin/sh
#! /usr/bin/env bash
# http://fabien.benetou.fr/MemoryRecalls/ImprovingPIM
# TODO
# discard multiple edits on the same page

2
shell_scripts/wiki_page_diffs Executable file → Normal file
View File

@@ -1,4 +1,4 @@
#!/bin/sh
#! /usr/bin/env bash
## to be done in wiki.d/
grep diff: $1 | awk '{FS=":"; print $2}' | sort -n | uniq

2
shell_scripts/wiki_page_diffs_visualization Executable file → Normal file
View File

@@ -1,4 +1,4 @@
#!/bin/sh
#! /usr/bin/env bash
# deprecated for Processing visualizations http://fabien.benetou.fr/Wiki/Visualization#timeline
if [[ ! ("$#" == 1) ]]; then

2
shell_scripts/wiki_per_page_diffs_visualization Executable file → Normal file
View File

@@ -1,4 +1,4 @@
#!/bin/sh
#! /usr/bin/env bash
# deprecated for Processing visualizations http://fabien.benetou.fr/Wiki/Visualization#timeline

2
shell_scripts/wiki_recent_untrusted_edits Executable file → Normal file
View File

@@ -1,4 +1,4 @@
#!/bin/sh
#! /usr/bin/env bash
# TODO
# fix untrusted_edits path problem first
# note that the output format changed too

2
shell_scripts/wiki_semantic_categories Executable file → Normal file
View File

@@ -1,4 +1,4 @@
#!/bin/sh
#! /usr/bin/env bash
# to execute in wiki.d/

2
shell_scripts/wiki_total_diffs Executable file → Normal file
View File

@@ -1,4 +1,4 @@
#!/bin/sh
#! /usr/bin/env bash
# takes are argument the wiki root

2
shell_scripts/wiki_untrusted_edits Executable file → Normal file
View File

@@ -1,4 +1,4 @@
#!/bin/sh
#! /usr/bin/env bash
# TODO
# BUG! works with . but not with full path
EXP_ARGS=1