4337 links
  • Arnaud's links
  • Home
  • Login
  • RSS Feed
  • ATOM Feed
  • Tag cloud
  • Picture wall
  • Daily
    Type 1 or more characters for results.
    Links per page: 20 50 100
    page 1 / 1
    4 results tagged function x
    • How to use *args and **kwargs in Python - SaltyCrane Blog
      September 18, 2018 at 3:07:27 PM GMT+2 - permalink - archive.org - https://www.saltycrane.com/blog/2008/01/how-to-use-args-and-kwargs-in-python/
      args function kwargs python
    • Note: function pour log en bash

      Je me mets ça de côté pour gagner du temps la prochaine fois

      !/bin/bash

      logfile=/tmp/logfile.log
      errorfile=/tmp/error.log

      function log() {
      echo -e "\e[34m\e[1m[$(date +%Y-%m-%d) $(date +%H:%M:%S)] $1\e[0m" | tee -a /tmp/logfile.log
      }

      function logerror() {
      echo -e "\e[91m\e[1m[$(date +%Y-%m-%d) $(date +%H:%M:%S)] $1\e[0m" | tee -a /tmp/logfile.log
      }

      log "prout"
      logerror "pwet"

      February 10, 2017 at 10:29:21 AM GMT+1 - permalink - archive.org - https://links.infomee.fr/?tQ0ssA
      bash function log
    • 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
    • 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
    Links per page: 20 50 100
    page 1 / 1
    Shaarli - The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community - Help/documentation