Trending

#shellscript

Latest posts tagged with #shellscript on Bluesky

Latest Top
Trending

Posts tagged #shellscript

Post image

Programming Joke of the Day: Mar 11, 2026
Check out our app: https://restlesside.com 🚀 #programming #programminghumor #programmingjokes #shellscript #bash

0 0 0 0
#!/bin/bash

files=$(ls bc*.ppm)
numfiles=$(ls $files | wc -l)
numpages=$((numfiles*2))
frontat=1
backat=$numpages

for file in $files; do
    filewidth=$(pamfile -size $file | awk '{print $1}')
    pagewidth=$((filewidth/2))
    pamcut -right $pagewidth $file >| left.ppm
    pamcut -left $((pagewidth+1)) $file >| right.ppm
    if ((frontat % 2 == 0)); then
        mv left.ppm split$(printf %02d $frontat).ppm
        mv right.ppm split$(printf %02d $backat).ppm
    else
        mv right.ppm split$(printf %02d $frontat).ppm
        mv left.ppm split$(printf %02d $backat).ppm
    fi
    ((++frontat))
    ((--backat))
done

#!/bin/bash files=$(ls bc*.ppm) numfiles=$(ls $files | wc -l) numpages=$((numfiles*2)) frontat=1 backat=$numpages for file in $files; do filewidth=$(pamfile -size $file | awk '{print $1}') pagewidth=$((filewidth/2)) pamcut -right $pagewidth $file >| left.ppm pamcut -left $((pagewidth+1)) $file >| right.ppm if ((frontat % 2 == 0)); then mv left.ppm split$(printf %02d $frontat).ppm mv right.ppm split$(printf %02d $backat).ppm else mv right.ppm split$(printf %02d $frontat).ppm mv left.ppm split$(printf %02d $backat).ppm fi ((++frontat)) ((--backat)) done

Here's a little puzzle for you. Can you figure out the purpose of this one-off shell script I just wrote?
If you post an answer put it behind a CW so you don't spoil it for others!
#programming #scripting #shellScript #shellScripting #Linux

1 0 0 0
Post image

I really despise Linux shell script from time to time. Why does the first process to get the standard input consume it? WHY?!

I wish I could tag this as a cognito hazard...

#linux #shellscript #programming #why #deargodwhy

1 0 0 0
Preview
シェルスクリプトで壊さずに全ての引数を別コマンドに引き渡す書き方

シェルスクリプトで引数を(スペース等で)壊さずに引き継ぐときの正解は"$@"で、
sh -cを使う場合はsh -c '..."$@"...' -- "$@"という話、
忘れそうなので以下にまとめました。

www.techtips.page/ja/topics/884

#sh #ShellScript #Linux #POSIX

1 0 0 0

I spent WAY too long on a simple “don’t run bash script if it’s already running” solution. Here’s what I eventually worked out in case it’s helpful #bash #shellscript

OTHER_PIDS=$( pidof -x -o %PPID "$( basename $0 )" )
if [ -n "${OTHER_PIDS}" ]; then
# script is already running
exit
fi

0 0 0 0
Preview
MisskeyのAPIの叩き方(curl, Ruby) - Qiita Misskeyの各サーバーはAPIを公開していて、そのAPIを使ってBotやツールを作れます。GoやJavaScriptなどいくつかの言語ではAPIのラッパーが存在していますが、今回はそれらを使わず標準ライブラリや標準的なツールのみを使ってAPIを叩く際のコードを紹介...

MisskeyのAPIの叩き方(curl, Ruby) #ShellScript - Qiita https://mnmm.top/hvr

0 0 0 0

xargsの使い方 "xargs 完全理解マニュアル - xargs は多すぎる引数を分割するコマンドって知っていますか? #ShellScript - Qiita" https://qiita.com/ko1nksm/items/34cd96d39c2c5cd80eb4 #console #Tools #document

2 0 0 0

見てる: "xargs 完全理解マニュアル - xargs は多すぎる引数を分割するコマンドって知っていますか? #ShellScript - Qiita" https://qiita.com/ko1nksm/items/34cd96d39c2c5cd80eb4

0 1 0 0

Je vais garder ça comme exercice pour une prochaine formation #shellscript

Je propose une approche simple :
tr "[:punct:][:space:]" "\n" < bovary.txt | tr [:upper:] [:lower:] | sort | uniq -c | sort -nr

4 0 1 0
Preview
SSL使用時にApacheの再起動時で必要なパスワードの入力を省略 - Qiita 今回やること SSL証明書を使用する場合、Apacheの再起動時に秘密鍵のパスワードの入力を求められます。 開発段階だと、VirtualHostの設定を変更する度に再起動したりすることが多く、一台に複数のアプリケーションを保持している場合は、それぞれのパスワードの入力が必...

memo. パスフレーズを削除しない方法。
[SSL使用時にApacheの再起動時で必要なパスワードの入力を省略 #ShellScript - Qiita](qiita.com/yoshizaki_91...)

0 0 1 0
Preview
¿Qué es lo que estás ejecutando? Programas, scripts, comandos internos, funciones y alias en Linux - CIBERNINJAS - Linux, Sistemas Operativos, Software ¿Qué ocurre exactamente cuando ejecutas un comando en Linux? Puede parecer un proceso directo, pero en realidad pueden pasar muchas cosas dependiendo de si se

🧠 ¿Qué estás ejecutando en Linux? Conoce la diferencia entre programas, scripts, comandos internos, funciones y alias ciberninjas.com/que-es-lo-qu...

#LinuxTips #ComandosLinux #ShellScript #ProgramaciónLinux #SysAdmin #LinuxAvanzado #ConsolaLinux #TerminalTips #HackeoÉtico

0 0 0 0

🐧💡 Linux Tip of the Day
Run a script in the background and let it survive after closing your terminal:

nohup bash script.sh > output.log 2>&1 & disown

✨ Useful when running long processes over SSH!

#Linux #TuxTips #TerminalMagic #DevLife #ShellScript

0 0 0 0
Preview
Static Analysis for Shell Programs: Ensuring Safer Scripts | GameFi News Researchers propose static analysis for shell scripts. Prevent bugs, ensure safety, and improve your workflow. Read more!

AIMindUpdate News!
🚀⚡️Did you know shell scripts can corrupt data? Researchers propose static analysis to make them safer! #ShellScript #StaticAnalysis #SoftwareSecurity

Click here↓↓↓
aimindupdate.com/2025/05/08/s...

0 0 0 0
Post image

Cada día más cerca de reemplazar a Excel 🥹

#ShellScript #SeniorDeveloper

0 0 0 0

GNU awkがv5.3.0から、本家Awkが20230911から`--csv`オプションを導入しているとのこと / awkが新しくなる!? 本家AwkがUnicode (UTF-8)とCSV対応に! #ShellScript - Qiita qiita.com/ko1nksm/item...

0 0 0 0
Preview
How To Replace Text In Multiple Files Using A Bash Script In Linux - OSTechNix In this guide, we will learn how to replace text across multiple files efficiently using a Bash script in Linux.

How To Replace Text In Multiple Files Using A Bash Script In Linux #Bash #ShellScript #Linux #Linuxcommands #Linuxhowto #Linuxbasics
ostechnix.com/replace-text...

1 0 0 0
Video

Make your Mac device management as powerful as the Mac you love.

Discover a step-by-step guide on remotely running shell scripts on #Mac devices with #Scalefusion #UEM. Simplify your #IT workflows and let Scalefusion do the heavy lifting.

See here: lnkd.in/dcDsDDYT

#shellscript #macadmin #macos

0 0 0 0
Preview
新しい curl コマンドの使い方 完全ガイド(2025年版) - Qiita はじめにcurl コマンドはシェルやシェルスクリプトから HTTP 通信を行うのによく使われるコマンドです。あらゆる環境(100 種類の OS)で動作し、macOS や Windows には標準で…

10年前で知識止まってたありがたい。とんでもないスイスアーミーナイフになってるな。
--
新しい curl コマンドの使い方 完全ガイド(2025年版) #ShellScript - Qiita https://buff.ly/3Dbo8w8

2 0 0 0
Preview
新しい curl コマンドの使い方 完全ガイド(2025年版) #ShellScript - Qiita はじめにcurl コマンドはシェルやシェルスクリプトから HTTP 通信を行うのによく使われるコマンドです。あらゆる環境(100 種類の OS)で動作し、macOS や Windows には標準で…

"新しい curl コマンドの使い方 完全ガイド(2025年版) #ShellScript - Qiita" https://qiita.com/ko1nksm/items/30982a5f357f26ae166f

0 0 0 0

Automatic Let's Encrypt (DNS) Wildcard SSL Certificate Renewal with `acme.sh` for Kestrel implemented.

github.com/acmesh-offic...

#dotNET #Kestrel #Yarp #LetsEncrypt #acme #shellscript #Ubuntu #SSL #Wildcard #DNS

1 0 0 0
Preview
Bash declare Command Usage With Examples - OSTechNix In Bash shell scripting on Linux, the declare command is used to define, set attributes, modify, and display variables and functions.

How to Use the declare Command in Bash Scripts #declare #Bashscripting #Shellscript #Bash #Linux #Linuxcommands #Linuxhowto #Variables #Functions
ostechnix.com/bash-declare...

1 0 0 0
Preview
How to Create an MLK Jr Quote of the Day Shell Script Want to have inspirational quotes from your favorite historical figure every time you log in to your Mac command line? Here's a shell script to do just that!

Want to have inspirational quotes from your favorite historical figure every time you log in to your command line? Here's a shell script to do just that for Mac/Linux, with quotes from Dr. Martin Luther King Jr.: www.askdavetaylor.com/how-to-creat... #linux #shellscript #programming #bash #mlk #mac

1 0 0 0
Which USB devices are currently attached?

Which USB devices are currently attached?

Quick Tip: Which USB devices are currently attached? sixcolors.com/post/2025/01/quick-tip-w... from @jsnell@zeppelin.flights @jsnell #Mac #unix #shellscript

1 0 0 0
git-commit-message-summary-length Cross-repo customizable Git activity log dotfile with CLI for viewing and filtering entries

Another week another backlog project release!

git-commit-message-summary-length measures the length of a commit message's first line, and compares that to soft and hard limits.

git-commit-message-summary-length.olets.dev

#git #CLI #OpenSource #ShellScript

0 0 0 0

Pythonのshというライブラリを使うと、`sh.ls("-la")`みたいな感じにPythonプログラムからコマンドが実行できる。これ、いいですね #python #shellscript

sh — sh 2.0.6 documentation: https://sh.readthedocs.io/en/latest/

0 2 0 0

Trying to build a small shell script for DDev. Small project to get myself working on basic stuff like that.

#ShellScript
#SimpleProgramming

0 0 0 0

Ano que vem meu foco será em automação. Bora pars os cursos de #python, #shellscript e #kubernetes

0 0 0 0
Video

Se torne um expert em linha de comando! 🖥️

É a ferramenta perfeita para aprender e dominar, de uma vez por todas, linha de comando!

Compartilhe!

#shell #shellscript #linhadecomando #codigo #ViUmaVaga

1 0 0 0