Roberto A. Foglietta ha scritto:
errata corrige, questo è meglio (oltre al fatto che funziona!)
scusate,
-- Roberto A. Foglietta http://roberto.foglietta.name http://lugge.net
#!/bin/bash # this alias avoid security problem related to # maliciuos links as: "http://ciao.it; rm -rf ~/*" alias rm='security-problem-avoided' z1=$(echo "$0"|grep -i "firefox") z2=$(echo "$0"|grep -i "thunderbird") if [ -n "$z1" ]; then exe="firefox" cmd="openurl" cml="" hp="http://www.google"; if [ "$1" != "" ]; then hp="$1" fi elif [ -n "$z2" ]; then exe="thunderbird" cmd="mailto" cml="--compose" hp="" # security problem fixed with two " around $1 if [ "$1" != "" ]; then if [ "$1" == "--mail" -o "$1" == "--compose" ]; then hp="$2" else hp="$1" fi fi else exit -1 fi MOZILLA_FIVE_HOME="/usr/local/$exe" export MOZILLA_FIVE_HOME if pgrep -u `whoami` $exe-bin > /dev/null then hp=$(echo "$hp"|sed -e "s/mailto://";) $MOZILLA_FIVE_HOME/$exe -remote "$cmd($hp,new-tab)" else if [ "$1" == "" ]; then $MOZILLA_FIVE_HOME/$exe -UILocale it-IT -contentLocale IT else # security problem fixed with two " around $hp $MOZILLA_FIVE_HOME/$exe -UILocale it-IT -contentLocale IT $cml \"$hp\" fi fi