open-menu closeme
Home
RetroComp icon
Retro Computing Articles Composition Notebooks 8bit
DevOps icon
Automation K8s Done Right
GenAI icon
Fatlama Newsletter Generative AI
Projects icon
Software Projects Arduino Misterio Esp8266 SQLite
Status
Links icon
GitHub LinkedIn
About
github linkedin rss
  • Bash Regular expression replace (regexp)

    calendar Apr 13, 2022 · 1 min read
     en knowledgebase unix-featured  · bash
     ·
    Share on: twitter facebook linkedin copy
    Bash Regular expression replace (regexp)

    You can easily use bash to search-and-replace on variables…

    f="/home/alice/myfile.md"
    $ echo ${f//.md/.pdf}
    /home/alice/myfile.pdf
    
    $ echo ${f//alicee/bob}
    /home/alice/myfile.md
    
    $ echo ${f////-}
    -home-alice-myfile.md
    
    
    

     

    Splinch
  • Bash TCP conection feature

    calendar Jan 7, 2021 · 1 min read
     featured unix-featured  · bash unix
     ·
    Share on: twitter facebook linkedin copy

    Bash support tcp connection out of the box :)

     

    So you can write something like

    #!/bin/bash
    webhost="gioorgi.com"
    exec 5<>/dev/tcp/$webhost/80
    echo -e "GET / HTTP/1.1\\r\\nHost: $webhost\\r\\nContent-Length: 0\\r\\n\\r" >&5
    # get reply:   HTTP/1.1 301 Moved Permanently^M
    cat <&5
    

     

  • runif

    calendar May 28, 2020 · 2 min read
     en knowledgebase projects python software software-projects  · bash python
     ·
    Share on: twitter facebook linkedin copy
    runif

    Idempotent and minimal python 3 library for rapid scripting. Provide support for creating file, adding data to them, patching and so on.

    Why?

    (Ba)sh scripting is very easy to setup. So we end up using it all the time for simple procedural script.


    Read More
  • Pybash

    calendar Jan 14, 2020 · 1 min read
     en knowledgebase python software  · bash python
     ·
    Share on: twitter facebook linkedin copy
    Pybash

    The project has been renamed into “runif”. This page left only for Google Search happiness.

    Pybash is a python library to make python script as easy as in Bourne Again Shell (Bash).

    Bash scripting is very easy to setup. So we end up using it all the time for simple procedural script.


    Read More
  • Bash secret powers

    calendar May 14, 2014 · 3 min read
     en  · bash file python scripting unix
     ·
    Share on: twitter facebook linkedin copy

    Bash scripting has evolved a lot in the last ten years.

    I get used to relay on bash for all normal “data domination” tasks (like file system refactorings, database extraction and reporting and so on) and switching to python/ruby/perl when the complexity gets bigger. I didn’t imagine bash is even more powerful :) This article by Robert Muth so you new nice tricks: I  add here some other like mapfile and stress the most important one.

    Update 2016 Last but not least,if you do now know about bash history, this link will teach you a huge set of tricks Updated 2019 Bash Bible will further extend the topic.


    Read More

Recent Posts

  • Postgres Take it All
  • La ruota del Destino
  • Darth Android
  • Vps Provider
  • Chat
  • RSS Readers
  • Vibe Coding: easy to say, difficult to survive

Latest comments

    Giovanni Giorgi

    Copyright 1999-  GIOVANNI GIORGI. All Rights Reserved

    to-top