4259 links
  • Arnaud's links
  • Home
  • RSS Feed
  • Tag cloud
  • Login
search: tag:grep — newest first
  • Note: find exec grep print filename only match

    find . -name foo.yml -exec bash -c "grep -q office {} && echo {} && grep office {}" \;

    August 16, 2022 - permalink - https://links.infomee.fr/shaare/c7kuZw
    find grep
  • unicode - grepping binary files and UTF16 - Stack Overflow

    The easiest way is to just convert the text file to utf-8 and pipe that to grep:

    iconv -f utf-16 -t utf-8 file.txt | grep query

    January 5, 2018 - permalink - https://stackoverflow.com/questions/3752913/grepping-binary-files-and-utf16
    grep utf
  • regex - Bash: One-liner to exit with the opposite status of a grep command? - Stack Overflow

    La commande eb d'amazon retourne toujours 0 même quand elle foire.. pas pratique pour repérer une erreur dans les script de CI..

    Mes scripts bash commencent tous avec "set -e" pour sortir en erreur des qu'il y a un probleme

    La commande eb me pose donc problème, j'ai fixé ça de cette mainère en attendant de trouver mieux :

    eb blablabla 2>&1 | ( ! grep ERROR)

    De cette manière, si dans le stdout ou dans le stderr on trouve 'ERROR', le grep va matcher et renvoyer 1 (dans une utilisation normale, grep retourne 0 si il match, mais avec le point d'exclamation, on inverse ce retour)

    Ce qui aura pour effet de passer mon script en erreur !

    January 4, 2017 - permalink - http://stackoverflow.com/questions/15367674/bash-one-liner-to-exit-with-the-opposite-status-of-a-grep-command
    code error exit grep status
  • git - How can I grep hidden files? - Stack Overflow

    I have a bad habit: grep -r search *

    It does not search in hidden files/dir...

    Better to do this:

    grep -r search .

    October 6, 2016 - permalink - http://stackoverflow.com/questions/10375689/how-can-i-grep-hidden-files
    grep
  • Note: grep non ascii character

    Can be useful

    grep --color='auto' -P -n "[\x80-\xFF]" file

    April 12, 2016 - permalink - https://links.infomee.fr/shaare/fnmSpg
    ascii grep
  • micha/jsawk
    September 18, 2015 - permalink - https://github.com/micha/jsawk
    awk grep json
  • About | sift - a fast and powerful open source alternative to grep

    Plus rapide que grep, ack, ag...
    à tester

    September 14, 2015 - permalink - http://sift-tool.org/info.html
    ack ag grep
  • rgrep grep -r et grep -R

    rgrep et grep -r sont équivalents : on cherche récursivement

    grep -R est légerement différent dans le sens où il va suivre les liens symboliques ce qui peut être plus pratique..

    April 29, 2014 - permalink - https://links.infomee.fr/shaare/xsOUWg
    grep linux
  • Faster Grepping in Vim

    Parait que ça va plus vite que ack
    à tester

    November 28, 2013 - permalink - http://robots.thoughtbot.com/faster-grepping-in-vim/
    ack grep linux vim
  • ack, une alternative à grep pour codeurs

    ack permet de rechercher dans une arbo plus facilement (moins verbeusement) qu'avec grep et find.
    Orienté developpeur car il ignore tous les fichiers/dossiers des gestionnaires de versions (svn, git, vcs, mercurial..)

    August 2, 2013 - permalink - http://fr.nicosphere.net/ack-une-alternative-a-grep-pour-codeurs-2380/
    ack alternative find grep
  • Remplacer des mots dans plusieurs fichiers - Blog notes Aternatik

    grep -rl mot1 *.php | xargs sed -i 's/mot1/mot2/g'

    February 25, 2013 - permalink - http://aternatik.org/articles-et-ressources/Remplacer-des-mots-dans-plusieurs
    grep sed