Search
Translate / Traduci
-
Available even in U.S.A. Support Gioorgi Editorial Board
June 2023 M T W T F S S 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Gioorgi EverGreen
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 bash, regexp
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
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 bash, python
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 bash, python
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