Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [bash]

Bash is a free shell for Unix-like operating systems from the GNU Project.

0
votes
1answer
19 views

awk and sed append end of line each related line

I want to do some line manipulation but am stuck in the line by line processing. My file looks like this: 10.10.10.10 ABtest 10.10.10.11 ABprod I want to append a string at each line according to ...
0
votes
0answers
17 views

Missing site_perl and vendor_perl in bash shell

Whenever I use the terminal in Manjaro KDE, I get a message: bash: /bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl: No such file or directory ...
0
votes
0answers
13 views

Python web based interpreter security issues [on hold]

I am making a web based python interpreter which will take code executes it and give output on the same web page. But this has some serious loop holes like someone can execute bash script using python'...
0
votes
0answers
26 views

How to call a bash script out of a Mac OS X app [on hold]

My script touch_a.sh gets executed correctly, when running from my bash terminal: two files are generated within my private tmp directory: touch_a.txt by touch_a.sh and touch_b.txt by touch_b.sh (...
0
votes
0answers
10 views

macOS ssh ignoring UserKnownHostsFile option

I'm frequently sshing to virtual machines through a jump host that have ephemeral IP addresses and often have changing ssh keys. I don't want to be prompted if the ssh key changes nor prompted to ...
0
votes
0answers
14 views

How to run this .sh file in windows? [on hold]

I had a .sh file in Ubuntu which I used to batch convert files using ffmpeg. The content of the .sh file is as follows: #!/bin/bash for mp3File in *.mp3; do outputFile=$(basename "${mp3File}" ....
1
vote
0answers
27 views

grep process is changing it's PID continously

I am using grep to find some 'abcd' in large file. So it is running for quite some time but the PID of this process is changing continuously. I am not able to understand why ? Here is the sample top ...
0
votes
1answer
24 views

How to compare an escape sequence with a constant string?

I wanted to do a thing conditionally based on the background colour of my terminal, which I found out can be grasped by running printf '\e]11;?\a' In my case the output is stanton@mybox:~$ printf '\...
2
votes
2answers
24 views

trap in freestyle shell script not working in jenkins

I want the gracefull killing of my Jenkins job if someone aborts it, So I tried to trap the abort signal and customise killing step using shell script. But It seems like Jenkins is ignoring all the ...
0
votes
1answer
24 views

Deleting all subdirs except ones that match a certain pattern

I would like to delete all sub-directories and files in a given directory except directories that match a certain pattern: example_dir/model-*/gen-*/share/** General setup: I generated several ...
0
votes
1answer
26 views

Network unavailable inside udev shell script

I have the custom shell script executed when FireWire device connected/disconnected from my PC. Script executed successfully but I found network unavailable inside this script. Here is my .rule: [...
0
votes
2answers
53 views

Why is my bash shell script changing spaces to linefeeds?

I started out writing a simple bash shell script to find duplicate files within a given directory using SHA1 to detect matches. Everything worked until I encountered file names with spaces. The ...
0
votes
0answers
23 views

Continuously detect a change of chksum of files under folder with inotify-tools

I just installed inotify-tools. I would like to continuously detect change of chksum of files under folder /path Once a change was detect ( under /path ) then it will print echo “chksum of files ...
1
vote
0answers
20 views

Unix printf does not format strings as expected - it prints the formatting string instead

I want to write some ENV-Variables into a .txt file with the printf command (and ignore lines which are empty because the env variable is not set): printf '%-79s' "${foo1}${bar1}" | grep -v '^\s\{79\...
0
votes
1answer
31 views

Executing rsync shell command from php file on web browser

Firstly, we wanna move the changes from one system to another system and for this, we have a shell script in synchfolders.sh file as follows rsync -av --delete -e 'sshpass -p Wordpress@123 ssh -p 22' ...

15 30 50 per page