Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
Super User

Questions tagged [shell-script]

A shell script is a script written for the shell, or command line interpreter, of an operating system.

Filter by
Sorted by
Tagged with
3 votes
0 answers
78 views

I have set up some right-click context menu entries for .ps1 files to run PowerShell scripts in Windows Terminal instead of ConHost. Screenshot: So I can run a one-off script elevated or un-elevated ...
2 votes
2 answers
183 views

Please note that I have done some search and tried different solutions with sed/awk and nothing worked. I'm stuck, so I posted the question here requesting your help. Let’s say that there's a generic ...
0 votes
0 answers
78 views

I got a pretty simple script for my Raspberry PI 5 which I intent to use primarily as a media center. In pseudocode, it does: You got 5 seconds to press key if no key pressed launch desktop ...
3 votes
1 answer
421 views

I'm writing a shell script that creates a file; the text inside the file must contain the string ${...}, which doesn't have to be treated as a variable but as pure text. tee -a /etc/apt/apt.conf.d/...
Sig's user avatar
  • 561
0 votes
0 answers
212 views

TLDR Attempted automated downloading of files through scripts and tools like wget/yt-dlp results in the site redirecting from the higher resolution file requested to a lower resolution version. This ...
0 votes
1 answer
91 views

I need to turn off the indexing/Spotlight in a volume to rebuild the index/search. (To then: Full Disk Access >> sudo rm -rv /Volumes/MY-VOLUME/.Spotlight-V100 >> sudo killall mds >>...
2 votes
2 answers
244 views

General overview I am currently developing a widget for Debian to show the number of the updates complete and the total number of packages to update. The desired rendering could be something like: ...
6 votes
2 answers
394 views

seq 100 | ... wc -l What can fill in for ... so that that wc -l prints 10, ten times? A clunky way I can think of is: seq 100 | xargs -L10 bash -c '(for i; do echo $i; done) | wc -l' bash Wondering ...
0 votes
2 answers
100 views

Today I learned that the FreeBSD cp utility (as found on Mac OSX) has a useful special behavior for cp -R dir1/ dir2. Namely: -R — If source_file designates a directory, cp copies the directory and ...
17 votes
2 answers
2k views

How do I set up a cron job which runs on Monday of the week when there is a 3rd Thursday? Example, in March the 3rd Thursday is on the 20th, so the job needs to run on 17th which is a Monday. ...
6 votes
3 answers
2k views

If my PyTorch training script is run twice at once, the second run will fail due to not having enough GPU memory. So, I want a bash script that I call like ./scripts/wait.sh && ./scripts/train....
1 vote
1 answer
333 views

KDE Plasma 5.27.11 on Debian 12 amd64 I need to send some very short signals over USB on workstation's power management sleep and wake up events(not login and log out, they work fine). I have prepared ...
0 votes
1 answer
313 views

I am writing a shell script in Bash. Within the Bash terminal I am using "CLI" commands to do some function. In this example I am creating a model, that if the syntax is correct, will ...
2 votes
1 answer
232 views

I have two images (of a schematic) and I want to highlight the differences on one of them: Using imagemagick I can create the visual diff and I can also overlay it over the second image: compare ...
0 votes
0 answers
471 views

I'm developing a tool that needs to activate a Python virtual environment using a custom command. Currently, I'm using the following alias in my .bashrc file: alias activate_env="source ./env/bin/...

15 30 50 per page
1
2 3 4 5
...
98

AltStyle によって変換されたページ (->オリジナル) /