home.social

#bashscripting — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #bashscripting, aggregated by home.social.

fetched live
  1. Today I had an idea for an interactive REPL for local PHP. Like similar to what TInkerwell does, but written in bash, tmux and linux builtins.

    I think this will be a fun little project. 🙂

  2. PSA for anyone auditing Linux fleets: getent passwd is NOT the same as cat /etc/passwd when LDAP or SSSD is configured. Your audit scripts will miss every centrally-managed account if you only parse the local file.

    Also, useradd's default shell comes from /etc/default/useradd -- on many distros that's /bin/bash. If you're creating service accounts without --shell /usr/sbin/nologin, you're handing out interactive shells.

    #LinuxSecurity #SysAdmin #BashScripting #Security #DevSecOps #InfoSec

  3. PSA for anyone auditing Linux fleets: getent passwd is NOT the same as cat /etc/passwd when LDAP or SSSD is configured. Your audit scripts will miss every centrally-managed account if you only parse the local file.

    Also, useradd's default shell comes from /etc/default/useradd -- on many distros that's /bin/bash. If you're creating service accounts without --shell /usr/sbin/nologin, you're handing out interactive shells.

    #LinuxSecurity #SysAdmin #BashScripting #Security #DevSecOps #InfoSec

  4. Sobald man es richtig macht, funktioniert es. Immer wieder spannend. 🤷‍♂️🙈😅

    #Linux #BashScripting

  5. Sobald man es richtig macht, funktioniert es. Immer wieder spannend. 🤷‍♂️🙈😅

    #Linux #BashScripting

  6. Regex песочница

    В данной статье описывается процесс реализации песочницы для регулярных выражений с помощью платформы для контейнеризации Docker и утилит Linux. Цель - получить ограниченную среду, куда пользователь может подключиться по SSH и где у него будет минимум возможностей, чтобы он ничего не сломал, но мог свободно использовать регулярные выражения как со встроенными в среду txt заготовками, так и со своим произвольным пользовательским вводом.

    habr.com/ru/articles/1008668/

    #docker #bash #bashscripting #chroot #shell

  7. #Bash (Bourne Again Shell) ist die Standard-Shell in den meisten #Linux Distributionen und #macOS. Sie bietet nicht nur eine leistungsfähige Kommandozeilen-Schnittstelle, sondern auch eine vollwertige Skriptsprache. Mit Bash-Skripten kannst du Aufgaben automatisieren, komplexe Workflows erstellen und deine Produktivität als Systemadministrator oder Entwickler erheblich steigern.

    Egal, ob du ein kompletter Neuling in der Welt der Kommandozeile bist oder deine Kenntnisse auffrischen möchtest, dieser Artikel wird dir einen soliden Einstieg in die faszinierende Welt der Bash-Skripte bieten.

    https://admindocs.de/bash-grundlagen/bash-grundkurs-erstelle-dein-erstes-bash-shell-skript-und-fuehre-es-aus.shtml

    #linuxlearning #bashscripting #linuxadmin #sysadmin #systemadministration

  8. 🌸➡️🔥 ¡Comienza el Verano en el hemisferio sur!

    Mientras el calendario todavía bosteza, mi Conky ya hizo el cálculo:
    🌍 hemisferio sur detectado
    📐 latitud validada
    📅 solsticio confirmado
    🔥 Verano iniciado

    Todo gracias a un script en Bash corriendo en segundo plano, sin nubes, sin apps mágicas, solo lógica y terminal 💻✨

    Si tu escritorio no te avisa cuándo cambia la estación… ¿realmente es tuyo? 😏

    #Conky #verano 🌞🩴🕶️ #antix #BashScripting #HemisferioSur

    🚴‍♂️ Pruébalo: github.com/DrCalambre/OpenWeat

  9. The Bug Hunter’s Automator: Why Bash Scripting is Your Greatest Force Multiplier
    This article advocates for Bash scripting as a critical automation tool for bug bounty hunters, transforming fragmented manual workflows into efficient pipelines. The core problem addressed is the cognitive overhead of chaining reconnaissance tools manually (subfinder → httpx → waybackurls → nmap), which fragments focus and wastes time babysitting terminal outputs. The solution centers on creating Bash scripts that: (1) **Chain tools via pipes** into automated sequences, (2) **Handle output redirection** and logging automatically, and (3) **Implement error handling** and retry logic for failed requests. Key concepts include using `tee` for logging intermediate results, leveraging parallel execution flags, embedding sleep/retry loops for rate-limited targets, and creating reusable functions for common workflows. Benefits include eliminating idle wait times (scripts run while planning), reducing human error from manual copying, and freeing mental bandwidth for deep analysis and complex exploitation work. The article positions automation not as laziness but as strategic force multiplication, shifting effort from tedious labor to high-impact investigation. Practical implementation covers shell script basics, tool integration patterns, and workflow optimization for sustained efficiency during long engagements. #infosec #BugBounty #Cybersecurity #Automation #BashScripting
    santhosh-adiga-u.medium.com/th

  10. Aus Langeweile mal ein Script gebastelt, was mir mittels yt-dlp ganze Playlisten bei YouTube herunterlädt, mit Titelnummern versieht und Ordnernamen anhand der Playlistbezeichnung erstellt.

    Genauere Beschreibung gibt es hier:

    christiansblog.eu/tutorials/ba

    #linux #bashscripting #holzdiebimeinsatz #debian #ytdlp

  11. И снова USB-IP — сервер теперь с автобиндом и детачем и сам подхватит ключ клиент

    HA - как много в этом слове: Автоматический перенос виртуальных машин в кластере. 8 секунд и, например, сервер терминалов сменил место жительства совместно со всеми своими предустановленными программами - в другую серверную. И ... оставил аппаратные лицензии и ЭЦП, заботливыми руками проброшенные в виртуалки, тоскливо торчать из, возможно, погибшего железа. Отставить "оставил"!

    habr.com/ru/articles/901988/

    #usbip #linux #alt_linux #debian #systemd #bashscripting #распределенные_системы

  12. Интересный case

    Ковыряясь в скриптах наткнулся на интересный case. Чё тут интересного то? Подсказка, это не цикл. Да, вот эти вот break'и выглядят тут совершенно инородно. Возможно когда-то этот кусок эм, кода работал в цикле и break каким-то боком был нужен? Но сейчас цикла нет а brake есть. Бомбит? Бомбит до такой степени что я решился писнуть небольшую статейку про case . На 100%-ю полноту освещения не претендую, все мои эксперименты лишь очень поверхностные но несколько точек постараюсь расставить. Рассмотрим case

    habr.com/ru/articles/872608/

    #bash #bashскрипт #bash_scripting #bashscripting #bashпрограммирование #case

  13. [Перевод] История оболочки Bash и чему она нас может научить

    В этот день, практически в канун католического рождества, 23 декабря 1996 года, вышла оболочка Bash версии 2.0. Последний мажорный релиз на сегодня — это версия 5.3 . Сейчас Bash встроена почти во все версии Linux и MacOS, а также заявлена как встроенный компонент Microsoft Windows. Bash поставляется по умолчанию почти во всех дистрибутивах Linux и современных версиях MacOS и, как ожидается, вскоре он станет неотъемлемой частью Windows Terminal . Bash действительно повсюду и это не фигура речи. Как до этого дошло? В сегодняшней статье мы глубоко исследуем этот вопрос, задавая вопросы именно тем людям, которые причастны к разработке оболочек.

    habr.com/ru/companies/avito/ar

    #linux #avito #unix #shell #bashscripting #оболочка #история_it #перевод

  14. Every once in a while I think "I should learn all the esoterica of Bash scripting in the same way I walked the fascinatingly detailed path of the Windows Batch File, as a kid!"

    Then, I push a bit further down the Bash route, and the comparison is EXACTLY like those threads where someone asks "what's another Linux game like 'Torchlight'" and the top suggestion is...Nethack...

    (Not bashing Nethack!)

    I really love scripting langs like ABS-lang.org and the like, but also, Bash is just a thing that's all over the place...so it's good to be fluent...

    #bash #bashscripting #Linux #foss

  15. Every once in a while I think "I should learn all the esoterica of Bash scripting in the same way I walked the fascinatingly detailed path of the Windows Batch File, as a kid!"

    Then, I push a bit further down the Bash route, and the comparison is EXACTLY like those threads where someone asks "what's another Linux game like 'Torchlight'" and the top suggestion is...Nethack...

    (Not bashing Nethack!)

    I really love scripting langs like ABS-lang.org and the like, but also, Bash is just a thing that's all over the place...so it's good to be fluent...

    #bash #bashscripting #Linux #foss

  16. Записки bash-скриптера. Листок первый. Сокращённый if

    Существует огромное количество руководств, статей, видеоуроков по bash. И это очень здорово, но есть одна проблема с ними. Процент материала "для начинающих" среди всего этого богатства стремится к 100, а вот по-настоящему интересных тонкостей касаются не только лишь все. Я всегда любил bash-скриптинг, и сейчас пишу довольно много кода на bash. Периодически наталкиваюсь на неочевидные моменты; решил, что настала пора поделиться опытом с уважаемым хабрасообществом. Кому интересно разобраться, что же может быть не так с bash/zsh на этот раз -- добро пожаловать под кат.

    habr.com/ru/articles/833602/

    #bash #bashscripting #zsh #scripting #boolean

  17. oooof.... learning the difference between #taskset and #cpulimit to prevent system overheating has been a painful one! Needless to say, #taskset will lock a process to certain CPU cores, but not limit it's max usage. You can STILL overheat pretty badly! Learned THAT the hard way. #cpulimit on the other-hand, will limit the total CPU power by pausing the process periodically when it goes too high... thus keeping temps down exactly like I needed! #themoreyouknow #linux #cli #bashscripting

  18. Telegram-бот как системный администратор сервера

    При запуске сервера часто необходимо предоставить доступ к части функционала другим пользователям, при этом сами пользователи могут не иметь достаточных компетенций для полноценного использования софта и/или мы хотим ограничить доступный набор команд. Одним из вариантов решения является Telegram-бот, который является прослойкой между пользователем и софтом. С таким решением я встречался на реальном опыте уже как минимум два раза, и на основе одного из них я постараюсь объяснить, как это можно сделать.

    habr.com/ru/articles/796365/

    #python #telegrambot #bashscripting #ubuntuserver #aiogram

  19. Hey computer, which other years in my lifetime have leap days on Thursdays?

    #!/bin/bash
    for i in {1968..2068..4}
    do
    let out=`cal 02 $i | egrep "29" | wc -w`;
    if [ $out = '5' ] ; then
    echo $i;
    fi;
    done;

    1968
    1996
    2024
    2052

    Thanks, computer.

    #Linux #BashScripting #LeapYear

  20. Since I needed to point to it again for work reasons:
    If you are writing shell scripts and you think that they are portable, you probably should know this webpage:
    in-ulm.de/~mascheck/various/sh
    #posix #bash #bashscripting #linux #ksh #unix #unixhistory

  21. I have finally gotten the GCC packages to compile for ELFS! I've also been developing the elfs.sh environment script which contains the wrappers used to build sources. I have tweaked some of the wrappers to be more flexible as well. I added some new wrappers as well and added a help function. I've also made it set a custom bash prompt which shows the user they are in the ELFS environment.

    #linux #rocky #fedora #enterpiselinux #openela #linuxfromscratch #bash #bashscripting

  22. I've got a small build environment going for ELFS now. This includes some wrapper scripts and an env script for setting a couple environment variables. I also have it setup for Rocky sources now and the plan is to demonstrate how to compile a small buildroot which can be used to build the packages in the Core group.

    I'm going to start writing the first revision of the guide today too!

    #linux #rockylinux #fedora #enterpiselinux #openela #linuxfromscratch #bash #bashscripting

  23. New Episode: hpr3928 :: RE: Klaatu.

    Hosted by Some Guy On The Internet on 2023-08-23 is flagged as Explicit and is released under a CC-BY-SA license.

    Tags: #Bashscripting, #bashcommands, #bash_aliases.

    hackerpublicradio.org/eps/hpr3

  24. ICYMI: The new #BashScripting course on #LearnLinuxTV has launched. Every single lesson is now available! So why not #LearnLinux by writing scripts in bash? Check out this playlist. Also, please share the heck out of this! youtube.com/playlist?list=PLT9 #Linux #DevOps