Shaare your links...
78 links
Interesting Links Home Login RSS Feed ATOM Feed Tag cloud Picture wall Daily
Links per page: 20 50 100
page 1 / 1
7 results for tags Programmation x
  • Utiliser du Bash dans du Python via Subprocess
    ------------------------------------------------------------------------------------------------
    import subprocess

    def bash_command(cmd):
       subprocess.Popen(cmd, shell=True, executable='/bin/bash')

    bash_command('a="Apples and oranges" && echo "${a/oranges/grapes}"')
    ------------------------------------------------------------------------------------------------

    Sortie:
    ------------------------------------------------------------------------------------------------
    Apples and grapes
    ------------------------------------------------------------------------------------------------

    OU si probleme:

    ------------------------------------------------------------------------------------------------
    import subprocess

    def bash_command(cmd):
       subprocess.Popen(['/bin/bash', '-c', cmd])
    ------------------------------------------------------------------------------------------------

    Source 1:
    http://www.saltycrane.com/blog/2011/04/how-use-bash-shell-python-subprocess-instead-binsh/
    Source 2:
    http://jimmyg.org/blog/2009/working-with-python-subprocess.html
    Mon 08 Dec 2014 10:05:30 AM UTC - permalink -
    - ?n_pyBA
    Bash Linux Programmation Python
  • Cacher le code d'un script bash avec SHC
    Utiliser SHC.
    1) Le télécharger: http://www.datsi.fi.upm.es/~frosal/sources/
    2) make
    3) make install

    Pour faire un script utilisable à l'extérieur de la machine initiale, utiliser l'option -r exemple: shc -r -f monscript .

    Dépendances: make automake autoconf gcc (gcc++)/build-essential(debian like)

    Sources:
    http://www.thegeekstuff.com/2012/05/encrypt-bash-shell-script/
    http://www.linux-magazine.com/Online/Features/SHC-Shell-Compiler
    http://adiriswan.blogspot.be/2012/11/how-to-install-shc-on-your-linux-system.html
    Wed 22 Oct 2014 07:17:52 AM UTC - permalink -
    - ?KuveUQ
    Bidouille Linux Programmation
  • Comparer rapidement le contenu de deux variables en ligne de commande sous Linux
    diff <( echo "$var1" ) <( echo "$var2" )
    Tue 21 Oct 2014 12:30:41 PM UTC - permalink -
    - ?S--mqQ
    Bidouille Linux Programmation
  • Connaitre le temps d'execution d'une commande/script bash en seconde.
    /usr/bin/time --format='la commande a duré %e secondes' ta_commande


    Source: http://forum.ubuntu-fr.org/viewtopic.php?id=1103771
    Thu 16 Oct 2014 10:54:51 AM UTC - permalink -
    - ?kd9Mug
    Bidouille Linux Programmation
  • TreeSize Linux Script
    #/bin/sh
    du -k --max-depth=1 | sort -nr | awk '
        BEGIN {
           split("KB,MB,GB,TB", Units, ",");
        }
        {
           u = 1;
           while ($1 >= 1024) {
              $1 = $1 / 1024;
              u += 1
           }
           $1 = sprintf("%.1f %s", $1, Units[u]);
           print $0;
        }
       '

    http://blog.aclarke.eu/a-simple-treesize-shell-script-for-linux/
    Fri 28 Mar 2014 04:50:53 AM UTC - permalink -
    - ?wEvl6A
    Bash GNU/Linux Informatique Programmation
  • Pick up pattern from Source Code of a webpage
    You need: lynx package (pcman -S lynx / apt-get install lynx)

    Here all 720 quality(if the quality is in the title) mp4 from different webpage with incrementation:

    for ((i=MIN ; $i <= MAX ; i++))
    do
       geturlmp4=$(lynx -source URL/webpage$i.html | egrep -oe "http://.*_720p.mp4";)
       echo $geturlmp4 >> Listing_MP4.txt
    done
    Sat 28 Dec 2013 08:07:54 PM UTC - permalink -
    - ?Cp1pKw
    Bash Bidouille GNU/Linux Programmation
  • HTML URL Encode Reference
    URL encoding converts characters into a format that can be transmitted over the Internet.
    Mon 04 Nov 2013 02:20:12 PM UTC - permalink -
    - http://www.w3schools.com/tags/ref_urlencode.asp
    HTML Programmation Reference
Links per page: 20 50 100
page 1 / 1
Shaarli 0.0.41 beta - The personal, minimalist, super-fast, no-database delicious clone. By sebsauvage.net. Theme by idleman.fr.