4337 links
  • Arnaud's links
  • Home
  • Login
  • RSS Feed
  • ATOM Feed
  • Tag cloud
  • Picture wall
  • Daily
Links per page: 20 50 100
◄Older
page 2 / 4
Newer►
62 results tagged bash x
  • Afficher l'original d'un fichier qui provient d'un package sous debian en une commande

    à mettre dans son bashrc

    showOriginal() {

    argument = complete path to a file

    output original file content

    packageName=$(dpkg -S $1|cut -d':' -f1)
    tmpdir="/tmp/showOriginal-$packageName-$(date +%s)"
    mkdir $tmpdir
    cd $tmpir
    apt-get download $packageName > /dev/null
    dpkg -x *.deb $tmpdir
    cat ${tmpdir}$1
    cd - >/dev/null
    rm -rf $tmpdir
    }

    26 septembre 2014 à 16:59:47 UTC+2 - permalink - archive.org - https://links.infomee.fr/?tdQ_tA
    bash bashrc script
  • Quickly navigate your filesystem from the command-line

    jusqu'à présent j'utilisais des alias dans mon bashrc du genre :
    cdbackup() { cd /home/foo/backup/; }

    Mais la méthode proposée est bien plus pratique

    8 août 2014 à 09:55:32 UTC+2 - permalink - archive.org - http://jeroenjanssens.com/2013/08/16/quickly-navigate-your-filesystem-from-the-command-line.html
    bash shell
  • Why Zsh is Cooler than Your Shell

    zsh ça a l'air bien quand même. Le coup des alias inline ça rox ( gp=|grep -i )

    29 juin 2014 à 22:14:30 UTC+2 - permalink - archive.org - http://www.slideshare.net/jaguardesignstudio/why-zsh-is-cooler-than-your-shell-16194692
    bash shell zsh
  • Defensive BASH programming - Say what?

    via arnaudb

    2 juin 2014 à 13:20:25 UTC+2 - permalink - archive.org - http://www.kfirlavi.com/blog/2012/11/14/defensive-bash-programming/
    bash
  • xclip - Documentation Ubuntu Francophone

    Bien pratique pour intéragir avec le pressepapier en cmdline, exemple :

    function nowplz {
    xclip -i <<< $(date "+%Y-%m-%d %H:%M")
    }

    va copier dans le presse papier la date et l'heure actuelle

    27 mars 2014 à 15:16:31 UTC+1 - permalink - archive.org - http://doc.ubuntu-fr.org/xclip
    bash clipboard presse_papier
  • Running commands in parallell using bash | Michael Boman

    bien utile

    cat liste | parallel --gnu -j 10 ssh root@{} 'ls'

    20 mars 2014 à 15:27:31 UTC+1 - permalink - archive.org - http://blog.michaelboman.org/2012/04/running-commands-in-parallel-using-bash.html
    background bash parallel
  • thumbnail
    sorting - Bash - Difference Between two lists - Stack Overflow

    Pour obtenir la diff des éléments entre deux listes :

    To get the lines only in the old file:
    comm -23 <(sort /tmp/oldList) <(sort /tmp/newList)

    To get the lines only in the new file:
    comm -13 <(sort /tmp/oldList) <(sort /tmp/newList)

    comm -23 <(sort /tmp/1) <(sort /tmp/2)
    comm -13 <(sort /tmp/1) <(sort /tmp/2)

    19 mars 2014 à 15:24:21 UTC+1 * - permalink - archive.org - http://stackoverflow.com/questions/11165182/bash-difference-between-two-lists
    bash comm diff list
  • mktemp

    Pratique pour l'écriture de script en bash lorsqu'on a besoin d'un fichier temporaire :

    #Creation
    tmpfile=$(mktemp)

    #Utilisation...

    #Clean
    if [ -e "$tmpfile" ]
    then
    rm -f $tmpfile
    fi

    19 mars 2014 à 11:16:44 UTC+1 - permalink - archive.org - https://links.infomee.fr/?r6stZw
    bash mktemp tmp tweetit
  • BashGuide/InputAndOutput - Greg's Wiki

    You can avoid this by temporarily removing the indentation for the lines of your Heredocs. However, that distorts your pretty and consistent indentation. There is an alternative. If you use <<-END instead of <<END as your Heredoc operator, Bash removes any tab characters in the beginning of each line of your Heredoc content before sending it to the command. That way you can still use tabs (but not spaces) to indent your Heredoc content with the rest of your code. Those tabs will not be sent to the command that receives your Heredoc. You can also use tabs to indent your sentinel string.

    28 février 2014 à 17:37:35 UTC+1 - permalink - archive.org - http://mywiki.wooledge.org/BashGuide/InputAndOutput
    bash heredoc
  • Execute local script remotly and get ouput into a local log file

    Cool stuff :

    ssh user@server 'bash -s' < local_script.sh > local_script.log 2>&1

    31 janvier 2014 à 15:53:51 UTC+1 - permalink - archive.org - https://links.infomee.fr/?ORnmyQ
    bash ssh
  • Command line one-liners | Arturo Herrero

    Sympa tous ces one liners ! il y a même un repo dans lequel on peut ajouter les siens : https://github.com/fxn/tkn

    Mes préférés :
    $ echo "!!" > script.sh
    $ cp file.txt{,.bak}
    $ (cd /tmp && ls)
    $ nc -l 5566 > data-dump.sql
    $ nc <his-ip-address> 5566 < data-dump.sql

    via Olivier

    22 janvier 2014 à 11:41:24 UTC+1 - permalink - archive.org - http://arturoherrero.com/2013/11/29/command-line-one-liners/
    bash commandline linux
  • More on Using Bash's Built-in /dev/tcp File (TCP/IP) | Linux Journal

    Créer une socket en bash :o

    10 janvier 2014 à 11:40:47 UTC+1 - permalink - archive.org - http://www.linuxjournal.com/content/more-using-bashs-built-devtcp-file-tcpip
    bash socket tcp
  • Deux syntaxes pour écrire une fonction en bash

    function sayhello() {
    echo hello
    }

    OR

    sayhello() {
    echo hello
    }

    Et en one-line :

    sayhello() { echo hello; }

    2 janvier 2014 à 14:24:13 UTC+1 - permalink - archive.org - https://links.infomee.fr/?zlvmKw
    bash fonction function
  • 12 Best Practices for Writing Bash Scripts - Kevin van Zonneveld

    Quelques bp sur bash

    2 décembre 2013 à 17:52:27 UTC+1 - permalink - archive.org - http://kvz.io/blog/2013/11/21/bash-best-practices/
    bash
  • Returning Values from Bash Functions | Linux Journal

    Je prefere la deuxieme solution :

    function myfunc()
    {
    local myresult='some value'
    echo "$myresult"
    }

    result=$(myfunc) # or result=myfunc
    echo $result

    14 novembre 2013 à 14:41:00 UTC+1 - permalink - archive.org - http://www.linuxjournal.com/content/return-values-bash-functions
    bash function
  • How to iterate over associative array in bash - Stack Overflow

    Comment déclarer et itérer sur un tableau associatif en bash :

    declare -A array
    array[foo]=bar
    array[bar]=foo

    for i in "${!array[@]}"
    do
    echo "key : $i"
    echo "value: ${array[$i]}"
    done

    14 novembre 2013 à 13:15:22 UTC+1 - permalink - archive.org - http://stackoverflow.com/questions/3112687/how-to-iterate-over-associative-array-in-bash
    array associative bash iterate
  • Bash Argsparse : mieux gérer sa ligne de commande dans ses scripts. - LinuxFr.org

    à voir, il y a aussi getopts

    5 novembre 2013 à 09:04:58 UTC+1 - permalink - archive.org - http://linuxfr.org/news/bash-argsparse-mieux-gerer-sa-ligne-de-commande-dans-ses-scripts
    arg argparse bash parse
  • showterm

    Un truc pour faire du screencast de terminal, ça peut servir

    23 octobre 2013 à 16:54:03 UTC+2 - permalink - archive.org - http://showterm.io/
    bash enregistrement screencast terminal
  • Cheat - Pour vous souvenir de la bonne syntaxe « Korben Korben

    Old mais je viens d'y repenser. Finalement je fais pareil, j'ai des mémo pour chaque commande dans un dossier de mon dropbox alors pourquoi pas essayer de les utiliser avec ça ? à tester. Dans tous les cas ça ne doit pas remplacer le man

    23 octobre 2013 à 07:53:20 UTC+2 - permalink - archive.org - http://korben.info/cheat-pour-vous-souvenir-de-la-bonne-syntaxe.html
    bash cheat console man memo shell syntax syntaxe
  • BashGuide - Greg's Wiki

    this one is good

    22 octobre 2013 à 09:20:40 UTC+2 - permalink - archive.org - http://mywiki.wooledge.org/BashGuide
    bash tuto
Links per page: 20 50 100
◄Older
page 2 / 4
Newer►
Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Help/documentation