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

learn more… | top users | synonyms

0
votes
0answers
14 views

ddclient: Script to change hostname in ddclient.conf

I need to change the hostname in /etc/ddclient.conf based on data stored in a MySQL table. I tried reading ddclient usage documentation, but couldn't find a way to do this. I wanted to avoid parsing ...
0
votes
0answers
35 views

Close terminal if exit code is not 0 for command after login

For security, I'm trying to set up double authentication for a CentOS server. The way it works is you log into a user with SSH keys then once you log in it executes su to change to the root user, ...
0
votes
0answers
11 views

Looking for a Batch script or Jenkins plugin

I have a two Jenkins jobs. First one do the build and copy the special version number in a property file. In my second Jenkins job, I read that property file in parameterized variable setup and ...
0
votes
0answers
19 views

Bash script monitor file modification after its closed

It has already been asked here and I have found the solution for the first part of my question. So for the moment I have a bash script (script1) where I evaluate the sha1sum of a specific file ...
0
votes
0answers
23 views

how to bring network up at boot time in ubuntu 14.0.4

I am write one shell script which execute on every boot, Script is as below. service lsyncd stop /etc/init.d/networking force-reload ifconfig eth0 > /home/sachin/status.txt old="0.0.0.0"; ...
0
votes
0answers
22 views

Monitoring a log file and send a notification (mail) when string is triggered

I want a nofitication (email) when the user-foobar is triggerd in the apache log like this 10.10.55.171 - userfoobar [21/Nov/2014:12:06:01 +0100] "GET /download/2719/test.jpg HTTP/1.1" 200 ...
0
votes
0answers
17 views

Add credits to the end of the video

Is it possible to use ffmpeg to make credit titles at the end of the video ? I have a very long string of authors separated by comma as input. Managed to create 1 frame and append all the string to ...
0
votes
0answers
30 views

Alternative ways of passing PS1 env variable into Ubuntu for SSH session

I know that there are twenty thousand answers, none of them worked as expected, I'm more surprised than you are, so please consider reading the story first. I'm trying to achieve what appears to be a ...
0
votes
0answers
9 views

rename using perl eval can mmv do this

Linux Mint 17 64-bit The following works to rename the numbering of files. # rename -n 's/(\d+)(.*)/($1+99).$2/e' *.txt 1-file.txt renamed as 100-file.txt 3-file.txt renamed as 102-file.txt ...
0
votes
0answers
18 views

Can I use ProxyCommand to run arbitrary commands on a target server via a jumpbox/middle server?

At work, we have a number of servers that we can only SSH into from our jumpbox server. Every now and then I need to execute a command on these servers. For example, if I want to execute df -H on ...
0
votes
0answers
34 views

Not able to open crontab -l

I am running crontab -l to view the crons on a RHEL server(v5.10) and getting the below error: crontab: error while loading shared libraries: libaudit.so.1: cannot open shared object file: No such ...
0
votes
0answers
18 views

Recursively create/update tarballs of old files inside directories

I have an archive directory of ftp files. I want to schedule a job to zip up any files that are older than 6mo into an tarball in each directory. I've started writing the script, but I feel like ...
0
votes
0answers
20 views

evilvte doesn't execute “su -c”

I have a script that must be run as root. I made a custom application launcher to launch this script, and the application launcher runs the code evilvte -e "su -c '/path/to/script.sh'". What happens ...
0
votes
0answers
32 views

linux bash/terminal emulator: key “q” not work

i am on debian, Xfce desktop env. When i press the "q" Key, there is no output on the terminal emulator screen/ bash standard output. The capital "Q" works. In vim the "q" works like every other ...
0
votes
0answers
8 views

Tab complete setsid

I regularly use setsid to open a program as a separate process, however it doesn't use tab completion so I end up writing the full program name. Is it possible to add tab completion to setsid? Has to ...
0
votes
0answers
11 views

How can I get the current song of a shoutcast server?

I have a Shoutcast radio station and I want to get the current song and artist into my bash script. What's the best way to do that?
0
votes
0answers
11 views

How to enable windows-style cntrl+backspace in msysgit (git bash)?

I would like to configure my msysgit environment to use windows-style backspace shortcuts, i.e. cntrl+backspace deletes a word. I found this ...
0
votes
0answers
24 views

How is a basic daemon made on OSX?

I have an OSX system that I'd love to have some daemons set up on that will automate the updating of all of my console utilities. How would I go about creating and running such daemons? I'd also like ...
0
votes
0answers
22 views

gfortran not working on my Mac OS X

I tried running gfortran on my Mac OS X, but it wouldn't work. When typing gfortran in the terminal I got the error -bash: gfortran: command not found. So I thought maybe my installation was not ...
0
votes
0answers
17 views

Is “Lynx: can't access startfile” normal when I'm looking for broken links? I'm kinda desperate

I'm doing a script in bash for checking broken links, is it normal that the dialogue "Lynx: Can't access startfile" appears when I run the script? This is my code so far: #!/bin/bash ...
0
votes
0answers
42 views

Linux bash - Add alias from script without source(-ing) the script

Is it possible to write a script like #!/bin/bash alias foo="bar -options" and get the alias added to the running shell without source(-ing) the script source myscript will work, but just ...
0
votes
0answers
19 views

Run xdg-open on mouseclick in a linux terminal emulator

I'd like the following functionality in a terminal emulator: after typing ls and pulling up a list of files, I'd like to be able to click on the file. This should runxdg-open on the file. This action ...
0
votes
0answers
24 views

openSUSE server terminal showing missing .} after pressing enter without any command input

My openSUSE server terminal is showing a missing .} after pressing enter without any actual command input. I think it might be a bash version issue but how to confirm & solve as I searched and I ...
0
votes
0answers
75 views

Shell Script automatically exits from SSH section after switching of user (through pbrun command)

I have the below piece of code.. ssh some_user@server << EOF echo 'Successfully connected to the server' pbrun previlige -u user ls pwd id ...few more commands EOF if [ $? -eq 0 ] then echo ...
0
votes
0answers
17 views

OSX 10.9 network up triggers browser launch with router configuration page

I have installed a MIFI tool a while ago on an OSX 10.9 and since then every time the network connection is up, a browser window pointing to 192.168.1.1 is opened. I uninstalled the MIFI tool and ...
0
votes
0answers
88 views

bash: git-receive-pack: command not found

I've just changed the git remote for my server, and now when I try to use git push web master, (after staging and committing the changes), I get this: bash: git-receive-pack: command not found fatal: ...
0
votes
0answers
30 views

Send stdout and stderr to file, and store the pid in another file using nohup

I am modifying a script to use my jar as a service. I am stuck with this line here: nohup java -jar $PATH_TO_JAR /tmp 2>> /dev/null >> /dev/null & echo $! > $PID_PATH_NAME I want ...
0
votes
0answers
33 views

Bash Script - Find “ERROR” and output to file

I'm writing my first bash script and could use some help / advice. I cannot test the script at the moment - just want to know if I have it setup correctly. I have a file $A_HOME/bin/nohup.out and I'm ...
0
votes
0answers
22 views

Interactive menu (autocomplete) in bash with dialog(1)

So we can use dialog --menu ... to make a menu. And we can quick select the option by first letter of the tag. I want dialog to register keystrokes and perform the autocomplete. E.g. we have 3 ...
0
votes
0answers
25 views

How to use bash to open several terminal instances

My current setup involves starting my computer up, loading several terminal instances, resizing them to fit in a grid, then loading a command on each to watch output Is there a way where I can set up ...
0
votes
0answers
25 views

Windows .bat or .sh file to prepare multiple repositories for sourcetree

What I am looking to do is run a script that will: delete folders a,b and c from a directory. re-create the folders a,b and c as a a local git repository (using their individual git source urls) ...
0
votes
0answers
199 views

What exactly is the “Shellshock” vulnerability?

Concerning the Shellshock bug (aka "bash bug", CVE-2014-6271), can someone explain how this vulnerability works? Based on the test given in some posts (below), it looks like some type of injection ...
0
votes
0answers
36 views

Maintain screen session when executing shell script on boot

Solved: I solved this problem by introducing a delay before executing the script: @reboot sleep 60; /root/start_server.sh On Ubuntu 14.04, I have a crontab entry set to run on reboot: @reboot ...
0
votes
0answers
28 views

Windows right click on git bash menu, report can not find sh

i am able to open Git Bash from the program, but right click on drop down menu 'git bash' it says can not find sh. How can I fix this problem?
0
votes
0answers
25 views

Call script from a bash-initialized clean environment

So I've got an executable with conflicting dependencies with the build system it is running in. (AKA Xilinx doesn't play well with others). I'd love to run a cmake script as part of the build process, ...
0
votes
0answers
31 views

Clean Mavericks Install: Bash and Environment Defaults?

Broadly: what are the default files in play on a clean OS X install when using environment variables and bash? What derives from root, and what from the local user? I always get turned around on ...
0
votes
0answers
15 views

CygWin shortcut to launch server, connect and start a program

I have miraculously only spent about 20 minutes getting an installation of cygwin to communicate with a remote box that I use for controlling my CNC machine. At this point, to get everything running ...
0
votes
0answers
61 views

Bypass the $Recycle Bin in CygWin?

I'm using a CygWin session to find a large number of directories at a certain level in the file system tree in a loop, compress each directory into 1 archive, then delete the directory This ...
0
votes
0answers
29 views

Trap a program that has no command line output

I am using the CrashPlan backup tool to backup my home file server. I use an ssh tunnel to interact with the GUI on the remote machine (as detailed here). Currently, I have an alias in my zshrc that ...
0
votes
0answers
132 views

iTerm/OSX Terminal: Change text margin from edge of window

Currently, I use iTerm on OS X. My terminal looks something along these lines: I came across this picture of a terminal setup on GitHub, and I wanted to imitate it: Specifically, I wanted to ...
0
votes
0answers
30 views

git-svn creates directories but doesn't check out content

I am migrating an SVN repository to Git using git-svn combined with some light bash scripts on Ubuntu 14.04. Locally. git-svn has worked fine so far (on Unix), but recently, it sort of gets stuck ...
0
votes
0answers
78 views

Script for temporarily disabling internet connection

I want to block internet connection to me for about 8 hours or so on my Linux machine. I have no will power, so simple call for ifconfig down ifconfig up or similar commands doesn't apply to me, ...
0
votes
0answers
54 views

Remove grep's line number output in Redhat 5.9

I havent used RH 5.9 until now. I started with 6 but we have some 5.9 servers. The syntax with 5.9 is a bit different with some things. grep for example will output a number line before the actual ...
0
votes
0answers
130 views

Get all inactive users on system with 'lastlog' on Redhat 5.9

I need a script that will basically give me the listing of usernames that have been inactive on a system for 90+ days. I use the lastlog command but it seems a bit tricky to try to grep out the time. ...
0
votes
0answers
113 views

shell script over SSH ends unexpectedly after running 'ant build'

I wrote a shell script that runs on remote host to build source code with 'ant build' command, and then distribute the built binary to other servers. However, right after Ant build is over ...
0
votes
0answers
156 views

Raspberry in kiosk mode - How to secure bash or change matchbox for switching tty

I want change my raspberry to a kiosk pc. It works well and is complete, but with some mechanics I've some trouble. The actual problem is, that the autologin mechanism is defeating the purpose of ...
0
votes
0answers
95 views

Automaticly run xinit from rc.local as different user

I'm working on some tuning of my raspberry pi b+. So I decided that midori should start automaticly after autologin. With startx it works without problems, but X is still to ressource hungry. So I'll ...
0
votes
0answers
24 views

How to clean up output from `watch git gc`?

git gc updates the output as it runs, perhaps using backspaces, control characters, and/or curses. (I'm not an expert on this.) How can I modify my watch -n 60 git gc bash command so that the output ...
0
votes
0answers
46 views

busybox cp 'are the same file' when copying directories

I'm porting a bash script that worked on OS X to Windows+BusyBox. The first command is to create a new directory mkdir ../new_directory Then to copy all files from the current directory to a new ...
0
votes
0answers
23 views

Check for available command

When I execute the bash script with root user I receive the output it say iptables not exist. Why this happens only with root? for CMDAPP in "hash" "curl" "iptables" do if ! hash "$CMDAPP" ...