Questions tagged [bash]
Bash is a free shell for Unix-like operating systems from the GNU Project.
11,778
questions
0
votes
0
answers
18
views
Script that checks whether agents running on workstation need idea where to write output [closed]
I want to write a script that checks whether specific software is running on a computer, i manage around 200 computers and I think this is the best way to check whether the necessary security agents ...
0
votes
0
answers
15
views
Task Scheduler Running Multiple Instances
I am encountering an issue with Task Scheduler on a Windows Server. I have a startup task that runs a program/script via Git Bash, which points to a .sh file that executes a Python script every minute....
0
votes
0
answers
21
views
How to configure XShell so that PgDn work properly in bash?
The key PageDown types a ~ in my bash session instead of showing next command. Why does this happen and which settings do I need to change?
In vi key works as expected.
I did as described in How to ...
0
votes
0
answers
31
views
How do I determine which line has too many arguments within the script itself?
When I run the script I get the following errors:
./A_High_Stakes_investigations.sh: line 11: [: too many arguments
./A_High_Stakes_investigations.sh: line 11: [: too many arguments
./...
0
votes
0
answers
11
views
How to apply Postfix milter *before* smtp_generic_maps for DKIM purposes?
My Postfix instance instance correctly signs outbound mail with DKIM when I set the myhostname parameter to be the domain I wish to send from, say domain1.com.
The issue I have is I have multiple ...
1
vote
1
answer
16
views
bash autocomplete custom script with possiblities from a text file
I have a shell script that I want to run that accepts one argument (it's actually a short hostname). All of the legal hostnames for that script are stored in a plain text file, one entry per line. I'd ...
0
votes
0
answers
64
views
How to pass a for loop commandline argument to kubectl exec shell when run over ssh
I am executing the following commands over ssh and then past it to kubectl exec.
ssh -i 'path\to\file' user@host 'kubectl exec -i pod-name -- bash -c "du --max-depth=1 /home -h -t 10M | sort -hr &...
2
votes
1
answer
47
views
In which cases outputs of basename "$x" and echo "${x##*/}" differ?
In the following case outputs of basename "$x" and echo "${x##*/}" are not differ:
$ x=xxx/yyy ; basename "$x" ; echo "${x##*/}"
yyy
yyy
In which cases (if any)...
1
vote
1
answer
26
views
How to run sendmail as another other user?
I am witnessing behaviour I cannot explain.
If I run sendmail as another user by executing the following commands seperately - that is, typing each command and pressing enter before entering the next:
...
0
votes
0
answers
21
views
Wrapper to monitor CPU and memory usage for a command line without knowing its duration in advance [duplicate]
This great (in my opinion) answer on Super User provides a solution to track CPU and memory usage of a command line. It is great, however, you need to know in advance the duration of your command line....
1
vote
1
answer
34
views
how do I format the wildcard inside the BOOLEAN expression so that it tests for all extensions?
I'm trying to sync two directories, Masters and Proxies, via a bash script:
# Loop through files in Proxy Files folder
for file in "$ProxyFilesDir"/*; do
# Extract filename without ...
1
vote
1
answer
44
views
How to Preend or Append File Name to Reflect Number of Pages in PDF using "qpdf" and "perl"
I am running the script at the bottom as a one-liner but have expanded for ease of reading.
Assume the directory contains the following file: File (11).pdf.
When the script executes, it simply repeats ...
-1
votes
0
answers
48
views
Letter "b" in terminal doesn't work only in terminal and other letters is fine in Parrot OS
In Parrot OS when I try to write "bash" for example it's written ^[[1;5Dash letter b in terminal displays as ^[[1;5D and this just happens in terminal in any other app it works:
In other ...
1
vote
1
answer
118
views
Using sed to edit filepath variable
I am trying to use the sed command to edit a value in the .git/config file. When running the remote origin command, the config file creates the line of text like this":
url = https://github.com/...
0
votes
0
answers
10
views
Start vlock as a screensaver on console only debian
I am using a revived Chromebook as a secondary laptop. The eMMC is mostly fried, but I have a UEFI grub settup that boots Debian from an SD card. It is console only - no X11, etc.
I can get the screen ...