Questions tagged [shell]
The term 'shell' refers to a general class of text-based interactive command interpreters most often associated with the Unix & Linux operating systems. For questions about shell scripting, please use a more specific tag such as 'bash', 'powershell' or 'ksh'. Without a specific tag, a portable (POSIX-compliant) solution should be assumed, though using 'posix' in addition or 'sh' instead is preferable.
shell
22
questions
0
votes
1
answer
19
views
Bash: How to continue for loop when condition X is satisfied
I'm trying to start a process on multiple VMs using GitHub Actions. However, the command doesn't complete (as it needs to continue running) so my for loop just kind of hangs.
What I need, is a way to ...
-2
votes
0
answers
6
views
Problem with Vagrant and shell provisioning on CentOS 7 [closed]
I'm having trouble provisioning a CentOS 7 virtual machine using Vagrant. My Vagrantfile is configured as follows:
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. ...
1
vote
1
answer
63
views
Create an alias in bashrc file [duplicate]
In Linux terminal, normally I can copy files from another unix server using:
scp -r [email protected]:/data/filename ./
which secure copies the remote file to my current directory. I've made sure ...
0
votes
2
answers
72
views
Pass multiple arguments to single command in custom position xargs
I want execute a command where I have the args as single string but they need to be in a custom position. E.g. in the following example I want the args to be positioned before any fixed args that I ...
0
votes
1
answer
45
views
ExecStart in systemd service does not support file names containing * [closed]
sage-server.service
[Service]
ExecStart=/usr/local/jdk-21.0.2+13/bin/java -jar /home/freedom/local/sage-app*.jar
When I run systemctl start sage-server, it fails.
Error: Unable to access jarfile /...
0
votes
2
answers
69
views
create a variable using a value of another variable and store value into the newly created variable in shell/bash script [duplicate]
I am trying to create a Variable from value of another variable and trying to store value into the created variable in Shell Script. For Example:
Let there is a existing variable i=1
I am trying to ...
-3
votes
0
answers
16
views
Automating curl commands [closed]
I would like to automate multiple curl commands, instead of copy pasting 3 multiple commands. I would like to merge all the 3 commands into one single step.
I am currently copy pasting 3 curl commands ...
0
votes
0
answers
20
views
Passing variable from shell script to another script using expect
I'm trying to write a script to be able to pass a variable using script_a.sh which extract a value from the database to pass another script script_b.sh which uses this value as part of the input for ...
-1
votes
3
answers
46
views
How to use grep in specific case? [closed]
How to extract part of the search with grep.
Example: I would like to extract lines with "bc" in them
but not lines containing "abc".
My not-so-elegant solution is:
cat file.txt | ...
-3
votes
0
answers
44
views
Reproduce a command shell in Java [closed]
There is a command:
echo -en ${stringToSign} | openssl sha1 -hmac ${s3Secret} -binary | base64
Tell me how I can reproduce the result in Java, maybe there are libraries?
P.S.
Shell wrapper libraries ...
-3
votes
0
answers
18
views
Find Todays file only in unix using find command [duplicate]
find -maxdepth 1 -type f -mtime -1
find -iname 'file_name*.gz' -mtime -1
why the commands giving me files from yesterday's date.
Require: - how to fetch some particular files created for today's date ...
-2
votes
0
answers
20
views
Autosys job which runs shell script is not invoking BTEQ which is present as separate file [closed]
When I tried to run the autosys job through node A, the job which triggers the shell script (ksh) it's corresponding BTEQ script is not getting triggered while the same job runs on Node B. If I ...
1
vote
2
answers
70
views
Regex using Bash metacharacters in double bracket `[[…]]` command using `=~` operator
The Bash reference manual, in sec. 3.2.5.2 Conditional Constructs, says
It is sometimes difficult to specify a regular expression properly without using quotes, or to keep track of the quoting used ...
1
vote
1
answer
60
views
Multiprocessing in bash [duplicate]
I wrote a script (wrapper) over one python project.
here are the links:
https://github.com/daniellerch/aletheia
https://daniellerch.me/stego/aletheia/intro-en/#aletheia-commands
The essence of the ...
0
votes
0
answers
50
views
sed: unterminated address regex when trying to delete empty lines [closed]
I am trying to delete all empty lines in a file using shell.
Unfortunately the following command does not work for me:
sed -i '/^\s$/d' filename.extension
I got the following error message:
sed: -e ...