Tag Archives: bash

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  
Posted in English Content, Knowledgebase, Unix | Tagged , | Comments Off on Bash Regular expression replace (regexp)

Bash TCP conection feature

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  
Posted in IT Featured, Unix | Tagged , | Comments Off on Bash TCP conection feature

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 … Continue reading
Posted in English Content, Gio's Software Projects, Knowledgebase, Projects, Python, Software | Tagged , | Comments Off on runif

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 … Continue reading
Posted in English Content, Knowledgebase, Python, Software | Tagged , | Comments Off on Pybash

Bash secret powers

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 … Continue reading
Posted in English Content | Tagged , , , , , , | Comments Off on Bash secret powers