Questions tagged [bash-scripting]
Bash scripting is making scripts in the Bash shell language.
959
questions
0
votes
0
answers
21
views
How to perform a zuluCrypt "Create Encrypted Container in Hard Drive" but as a Linux command line?
I have long been in the process of converting my manual steps to create a new backup disks into an automated script. The only part I have left is the initial "creation" of the disk, meaning ...
0
votes
0
answers
11
views
zip -FF on split files quietly
I have a bunch of split zip files which is large size.
Trying to -FF on the split files.
During the process zip asks questions like "zip file.z002 not found" and asks to select different ...
0
votes
0
answers
20
views
How to resolve issues migrating scripts from Vagrant (Ubuntu) to Docker (Alpine)?
I am trying to migrate my development environment from Windows to Linux, which is going fine. However, my setup in Windows was using Vagrant with VirtualBox as the provider to set up the development. ...
2
votes
0
answers
40
views
Why is GNU wget only returning an index.html.tmp file, instead of the actual files I want?
I want to download a lot of satellite data (organized by each day of each year) in .hdf format from NASA's LAADS DAAC archive. They have a helpful guide that provides a code sample to use with GNU ...
0
votes
1
answer
83
views
Restart autosys job after a fixed delay
I have a scenario where I have to retry run the failed autosys command job after 10 minutes. I have to retry rerunning it only twice. I cannot use n_retry attribute here because I need to wait for 10 ...
0
votes
1
answer
33
views
SOX do not want name files
Want to record a radio broadcast into separated files.
receiver | sox -traw -r8k -es -b16 -c1 - -b16 -es -c1 -r48000 -t wav ~/myfolder/$(date +%H_%M_%S).wav silence 1 0.10 0.1% 1 1 0.1% : newfile : ...
0
votes
0
answers
53
views
bash sourced command silently fails under WSL2 vs direct execution from shell?
I have a Bash script which evaluates JSON file to set environment variables and creates a function
The script works fine under native Ubuntu (22.04LTS), but when you run the same script under WSL2 (...
0
votes
1
answer
51
views
Match a User That Starts With a Single Letter
I've been handed a script written by another and been asked to modify it according to their needs. There's one line that needs to be altered:
if [ "$user" == "nobody" ]
This ...
0
votes
0
answers
194
views
Separating audio m4b file based on a cue file
Separating audio m4b file based on a cue file
How can I split an audio m4b into separate files using a cue file?
Note: The m4b file has no chapters that's why I need to use the cue file to split it.
I ...
0
votes
3
answers
40
views
Why doesn't `bash` work with piped output, when the output is as expected?
I'm running the following command to alias an entire folder of scripts:
ls | grep '\.sh$' | sed 's/\.sh$//' | awk '{print "alias "$1"=\"./"$0".sh\""}' | xargs -...
2
votes
1
answer
136
views
Execute self-extracting bash script (with binary data appended) w/o saving it first
I have a self-extracting bash script (binary data appended to the end) like this:
#!/bin/bash
export TMPDIR=$(mktemp -d)
ARCHIVE_START_LINE=$(...) # <omitted>
# extracting data archive into a ...
1
vote
1
answer
34
views
Moving directories that names end in - number matching a list.txt file
Graphic of Folder Structure :
I am very new to advanced shell commands and scripting. I have fundamental terminal knowledge but have never attempted to create an automation like this before. A pure ...
0
votes
0
answers
14
views
shc & gcc : Any use for the *.x.c. file that's created?
shc for "compiling" bash scripts, I end up with two files. One is obscured version of my bash script which works great, I also get an intermediate file *.x.c.. I say it this way because I'...
1
vote
0
answers
112
views
MPV to play videos with a geometry
I have YOCTO build and I have integrated the mpv to the image. I need to test something so, I wrote a script that could play videos with a certain width and height and position on the screen but mpv ...
0
votes
2
answers
252
views
Bash provide comma-separated list in multiple lines
I have a bash script that is suppose to run another program called file-selector.
#!/bin/bash
...
./file-selector -exclude="a/b/c/d/e/f1,a/b/c/d/e/f2,a/b/c/d/e/f3,a/b/c/d/e/f4,a/b/c/d/e/f5,a/b/c/...