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
    }

    September 26, 2014 at 4:59:47 PM GMT+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

    August 8, 2014 at 9:55:32 AM GMT+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 )

    June 29, 2014 at 10:14:30 PM GMT+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

    June 2, 2014 at 1:20:25 PM GMT+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

    March 27, 2014 at 3:16:31 PM GMT+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'

    March 20, 2014 at 3:27:31 PM GMT+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)

    March 19, 2014 at 3:24:21 PM GMT+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

    March 19, 2014 at 11:16:44 AM GMT+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.

    February 28, 2014 at 5:37:35 PM GMT+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

    January 31, 2014 at 3:53:51 PM GMT+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

    January 22, 2014 at 11:41:24 AM GMT+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

    January 10, 2014 at 11:40:47 AM GMT+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; }

    January 2, 2014 at 2:24:13 PM GMT+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

    December 2, 2013 at 5:52:27 PM GMT+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

    November 14, 2013 at 2:41:00 PM GMT+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

    November 14, 2013 at 1:15:22 PM GMT+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

    November 5, 2013 at 9:04:58 AM GMT+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

    October 23, 2013 at 4:54:03 PM GMT+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

    October 23, 2013 at 7:53:20 AM GMT+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

    October 22, 2013 at 9:20:40 AM GMT+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