Bash, also known as Bourne-again shell and written by Brian Fox, is the default shell in many Linux distributions and on macOS. It was released in 1989 and has been distributed widely. It is available on most modern operating systems, and has been ported to Windows 10. For shell scripts with errors, ...

learn more…| top users | synonyms (7)|bash jobs

0
votes
0answers
7 views

How to use quotes in environment variables expansion

In How can I use environment variables in body of a curl PUT request?, I was given the great advise to always use " using doing environment variables.Say I want do following query:curl -XPUT http:/...
0
votes
0answers
8 views

Wild Cards File Rename Script

I am trying to write a script which renames files based on a file extension.The script should prompt the user for their desired file extension. Following that it should ask the user what prefix to ...
-1
votes
0answers
12 views

Changing a time format of an xml file using a bash script

I'm trying to change the formatting of a time in a file using a bash script. Current time format:08:05:00 Goal time format:8-05There are other timestamps I don't want to change in the file and ...
-6
votes
1answer
22 views

Reading .txt file through Bash Script

I'm trying to create a 10 question quiz in Linux.I have the questions and answers in different .txt files. I want the script to allow the user to see one question at at time, then the user will return ...
-1
votes
2answers
27 views

else part not working in bash while read loop

In bash coding, What to do is that if the grep size is less than 800MB i want to ignore but if grep size is more than 800MB, i want to print that path in file xyz/symlinks_paths.txt. but problem ...
0
votes
0answers
28 views

killing the script process instead to use exit command in bash scripts

from my experience in bash script some times exit command not exit from the script because using a pipe lines , sub shell , or even deep loops , etc in spite this is rare case , I want to avoid ...
0
votes
0answers
11 views

Adding trusted certs to java cacerts from s3 bucket

I have some file(trusted certs file) in s3 bucket. I want to run shell command which will be part of user data.The shell command perform following task: get cert from s3 and add it to jre/lib/...
3
votes
1answer
32 views

adding dynamic number of days to a particular date in script

I have a date for example: 20160808 which is stored in a variable $d_date.I have another variable that contains the number of days I need to add to the d_date. Which is $days.Lets say $days=378.I ...
0
votes
2answers
22 views

Bash script overwriting existing .tar.gz file

I have written a small bash file to backup a repository. If the archive file doesn't exists, it should be created. Thereafter, files found should be appended to the existing file.For some reason, ...
0
votes
0answers
15 views

jar file not working after RPM build

I am trying to build an rpm for my jar. The jar file works fine when i run it. After i build my rpm, where the jar file is really just moved around abit, it no longer works.my build_securityservice....
0
votes
2answers
27 views

How to edit the script so variable values will be contained within apostrophes without the need that the user will add apostrophes?

I wrote the following bash script:#!/bin/bashTIMEOUT="5"SESSIONS="8"function usage {echo "Usage: $(basename $0) -l servers.list -c COMMAND"echo ""echo "Options:"echo " -l ...
1
vote
2answers
18 views

Remove basename (last directory) from a path and store them in a file

In bash, how to do it? For eg i have a text file named FILE1 having 4 paths in it seperated by new line: abc/def/zzz.txtghi.jkl/zzz.txtmno.pqr/zzz.txtstu.wvx/zzz.txtI want to create another ...
0
votes
0answers
22 views

Bash, any compound command as shell function body

According to Bash info page shell function definition's syntax isNAME () COMPOUND-COMMAND [ REDIRECTIONS ]orfunction NAME [()] COMPOUND-COMMAND [ REDIRECTIONS ]The BODY of the function is ...
0
votes
0answers
21 views

Bash Script, Circle CI, Docker image - unexpected newline

So I'm trying to figure out what's up with this bash script, it works totally fine on my local machine(MacOS):#!/bin/bashecho 'Fetching keys.....'creds=$(credstash getall)declare -a arrayKeys=($(...
0
votes
1answer
21 views

Rsync including all files

After some reading and trying rsync copy over only certain types of files using include option I can't get seem to get it to work.I run the following command:rsync -zarv -vvv -e ssh --prune-empty-...

153050per page
angop.ao, elkhabar.com, noa.al, afghanpaper.com, bbc.com, time.com, cdc.gov, nih.gov, xnxx.com, github.com,