403Webshell
Server IP : 61.19.30.66  /  Your IP : 216.73.216.59
Web Server : Apache/2.2.22 (Ubuntu)
System : Linux klw 3.11.0-15-generic #25~precise1-Ubuntu SMP Thu Jan 30 17:39:31 UTC 2014 x86_64
User : www-data ( 33)
PHP Version : 5.3.10-1ubuntu3.48
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/phpmyadming/lang/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/phpmyadming/lang/sort_lang.sh
#!/bin/sh
# $Id: sort_lang.sh 5206 2003-11-26 20:42:58Z nijel $
##
# Shell script to make each language file neat and tidy
#
# Robin Johnson <robbat2@users.sourceforge.net>
# August 9, 2002
##

specialsort()
{
    in=$1
    out=$2

    STRINGORDER="A B C D E F G H I J K L M N O P Q R S T U V W X Y Z"
    
    for i in $STRINGORDER;
    do
        egrep '^\$str'$i $in | sort >> $out
        echo >> $out
    done
}

sortlang()
{
    f=$1
    targetdir=tmp-$f
    mkdir -p $targetdir

    TRANSLATIONSTRING='//.*translate.*$'
    STRINGSTRING='^\$str[[:alnum:]_]+'
    WHITESPACE='^[[:blank:]]*$'
    CVSID='/\* \$Id: sort_lang.sh 5206 2003-11-26 20:42:58Z nijel $ \*/'

    echo -n "Extracting:"
    echo -n " head"
    egrep -i -v $TRANSLATIONSTRING $f | \
    egrep -v "$STRINGSTRING|$CVSID|\?>|<\?php" >> $targetdir/head

    echo -n " cvs"
    egrep "$CVSID" $f >>$targetdir/cvs

    echo -n " strings"
    egrep -i -v "$WHITESPACE|$TRANSLATIONSTRING" $f | \
    egrep $STRINGSTRING > $targetdir/tmp-tosort

    echo -n " pending_translations"
    egrep -i "$STRINGSTRING.*$TRANSLATIONSTRING" $f > $targetdir/tmp-translate
    echo

    echo -n "Building:"
    echo -n " strings"
    specialsort $targetdir/tmp-tosort $targetdir/sort

    echo -n " pending_translations"
    if [ -s $targetdir/tmp-translate ] ; then
        echo '// To translate:' > $targetdir/translate
        specialsort $targetdir/tmp-translate $targetdir/translate
    else
        echo -n > $targetdir/translate
    fi
    echo

    echo "Assembling final"
    echo "<?php" > $f
    cat $targetdir/cvs $targetdir/head $targetdir/sort $targetdir/translate \
    | uniq >> $f
    echo "?>" >> $f

    rm -rf $targetdir
}

echo "-------------------------------------------------------------------"
for i in "$@"; 
do
    if [ ! -f $i ] ; then
        echo "$i is not a file, skipping"
    else
        echo "Sorting $i"
        sortlang $i
    fi
    echo "-------------------------------------------------------------------"
done;

Youez - 2016 - github.com/yon3zu
LinuXploit