How To Manage Bash Functions Using declare Command In Linux #Bash #Function #Linux #Linuxhowto #Linuxbasics #Linuxcommands
https://ostechnix.com/manage-bash-functions-using-declare-command/
How To Manage Bash Functions Using declare Command In Linux #Bash #Function #Linux #Linuxhowto #Linuxbasics #Linuxcommands
https://ostechnix.com/manage-bash-functions-using-declare-command/
GitHub - opengrep/opengrep: Static code analysis engine to find security issues in code. https://github.com/opengrep/opengrep #vulnerability #JavaScript #OpenSource #dockerfile #typescript #analysis #security #clojure #GitHub #Python #golang #kotlin #scheme #static #julia #swift #Ruby #bash #code #dart #html #java #json #lisp #rust #yaml #C++ #PHP #jsx #lua #xml #C# #C #r
Just fired off one of my weirder #bash commands:
`while ! !!;do sleep 1;done`
Repeat my previously typed commands until it doesn't fail anymore. But the `! !!` seems rather fun :D
Zautomatyzujmy bezpieczeństwo – zobacz prelekcję z Jesieni Linuksowej 2024.
@rathann pokazuje, jak dzięki Compliance As Code można automatycznie sprawdzać i wdrażać polityki bezpieczeństwa, np. CIS Benchmark, za pomocą skryptów w Bashu lub Ansible.
Link do nagrania: https://tube.pol.social/w/5bBvy8awY1SsMhCvBoBrZ9
#security #automation #compliance #bash #ansible #linux #opensource #jesieńlinuksowa
Make your #JSON pretty, colorful and scrollable
in terminal.
(command that output json) | jq -C | less
- jq -C -> indent and force color output
- less -> let you navigate through the result.
I may state the obvious, but it's always cool to know or remember .
I have a #Bash alias (actually a function) for `git clone` that sets my #git config username and email address based on a prompt (I can select between various accounts/SSH keys I have).
I now want to do a similar thing for `git init`. Is there an easy way to call the same bash code for the prompt and setting git config values without duplicating it all between my two functions?
AFAIK bash functions cannot return values (e.g. my chosen username/email)...
I'm happy to announce #notesbash v1.1.0 ! New features include:
- A customizable export system to export your #markdown #notes using e.g. #pandoc
- a preview feature using the new term-open script, a #xdg-open like utility, but for the terminal
- a `.desktop` file for your favorite app-launcher
- completion scripts for #bash and #zsh
- the default extension set in the config is now used for all notes
https://codeberg.org/carmatani/notesbash/releases/tag/v1.1.0
#opensource #tui #terminal #foss
New Episode: hpr4331 :: Re-inventing the light switch
Lee does some home automation with Bash, Python and Apache Cordova
Hosted by Lee on Monday, 2025-03-10 is flagged as Clean and is released under a CC-BY-SA license.
Tags: #python, #bash, #cordova.
Today on the #HackerPublicRadio #Community #Podcast
This is weird but alt + backspace
no longer works on #Alacritty if you're using a #Fish shell, it does work on #Bash. I don't think this is a Fish "issue" either, since that keybind still works as expected, with Fish, on #Konsole. Anyone knows how to fix this?
---
edit:
I just realised that this is prolly not an issue with Alacritty + Fish on a "vanilla" setup - this only occurs when using #Toshy, a neat utility I've been using for a (long) while now that configures and mimics a #macOS like keybinds on a #Linux system through a service (that can easily be stopped/started, etc.).
I've reported this issue on their repo to see if they're able to figure this out. It most likely has something to do with the new Fish 4.0.0 release, since I'm still using the same Alacritty (and Toshy) version since this issue started. https://github.com/RedBearAK/toshy/issues/573
Gotta say, I wish #bash had local
/ lexically-scoped functions, rather than having to rely on hacks like:
function widget {
function ___widget_parse {
...
}
...
unset ___widget_parse
}
Something like this (which does not currently work) would be lovely:
function widget {
local function parse {
...
}
}
social.ayco.io/@ayo/1141319...
This is how you delete all files except one in Linux:
find . ! -name 'file.txt' -type f -exec rm -f {} +
#cli #find #linux #bash
Ayo Ayco (@ayo@ayco.io)
While I'm busy configuring the VM I thought it would be good to get a nice taste of Italia
With the compliments of Sesto Giovanni I got some Birra Moretti from a friend of mine in Europe
From the photographs and the hashtags it must be obvious what I'm doing. Creating a virtual machine with which I will go into simulation mode to ride beautiful machines of absolute maximum Torque and Power
A fabulous amount of source notes pop up
{quote
scsi_all.h started out life as a work by Julian Elischer to add SCSI
support to CMU Mach 2.5. It was 373 lines. Julian ported this to 386BSD,
included in the 386BSD patch kit and incorported into FreeBSD at its
creation. Justin used this file when writing CAM, and imported it with
the initial CAM import, but only 30% (100 lines) of the original
remained. Justin moved from bitfields to bytes in structures, dropped
the complex unions, and renamed many structures to have their length
appended. Only about 30 structure names and about 40 #defines remained
from the original. The define names were taken directly from the SCSI
standard with spaces replaced by '_', so had no creativity. Apart from
the license comment, there were no comments retained (all the comments
in the CAM import were written by Justin and Ken). Even at that time,
Justin and Ken could have put their copyrights and names and moved to an
acknowledgement of Julian.
In the almost 30 years since that original import, this file has grown
to 4500 lines. Kenneth Merry, Alexander Motin and Justin Gibbs write
85% of the file's lines, if mechanical commits are omitted. Other
contributors contributed less than %5 each of the file.
Replace the original license (which lacked a copyright even and has been
criticized as ambiguous) with FreeBSD's standard 2-clause license. Add
copyrights for Justin, Ken and Alexander, with the date ranges they
contributed to the file. Add a note about the origin of the file to
acknowledge Julian's original work upon which all this was built, though
it's become a ship of Theseus in the mean time, built and rebuild many
times.
On an absolute scale, there's less than 1% of the current file with
lines from the original, and those are named after the names in the SCSI
standards and likely wouldn't qualify for copyright protection.
Sponsored by: Netflix
Reviewed by: mav, ken
Differential Revision: reviews.freebsd.org/D49016
End Quote}
^Z
How wonderful to have learned this now
#bash #csh #ksh #sh #freeBSD #SCSI #bhyve #jails #ZFS #programming #POSIX
https://codeberg.org/FreeBSD/freebsd-src/commit/1016b3c344350fa5968f16852e5e4e388c51d817
Big news!
Testing is officially complete! BashCore is ready and will soon be available on SourceForge. A minimalist, fast, and powerful operating system designed for those who love simplicity without compromise.
Stay tuned for the release!