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

learn more… | top users | synonyms

0
votes
0answers
16 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
19 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
26 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
9 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
10 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
41 views

I accidentally deleted files of root folder

Now my root folder is looking empty.And I lost my shell string (same as: I accidentally deleted my /root folder and now my shell string is different. What gives?) What should I do now ? I created ...
0
votes
0answers
22 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
20 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
16 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
37 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
15 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
61 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
66 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
25 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
29 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
19 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
23 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
196 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
33 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
24 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
19 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
28 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
11 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
53 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
28 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
106 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
27 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
71 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
47 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
106 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
105 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
147 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
83 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
22 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
40 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
22 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" ...
0
votes
0answers
30 views

Desktop Gone in Centos 6

I had a third party library created a ~ folder (a bug there), and I tried to delete it by "rm -rf ~". And apparently, it is a mistake -- my session got rebooted and then when I went back in, all the ...
0
votes
0answers
79 views

smbclient fails silently to copy file in bash script

I have the following script: #!/bin/sh BACKUP=/respaldoBD NOW=$(date +"%d_%m_%Y") SMBCLIENT="$(which smbclient)" DBS="zabbix" for db in $DBS do FILE="mysql_$db.$NOW.gz" echo $FILE PARM="prompt; ...
0
votes
0answers
24 views

Need to source bash_profile each time

I have get a server space that runs linux. A user is created for me. I have a bash_profile in my home directory and I set environment variables for JAVA_HOME and JAVA. When I access server through ...
0
votes
0answers
19 views

Abort Printing of Huge Amounts of Text in Terminal

This has happened to me in a variety of instances: Sometimes I accidentally copy/paste the wrong thing into vim, and then I have to wait around 10 minutes for it to print through all that text. I ...
0
votes
0answers
36 views

Writing a secure login script

I'm trying to write a secure login script to allow a user to have limited access to a server and change particular options. My method for doing so is via a python script executed by the users ...
0
votes
0answers
26 views

Do functions/aliases defined in a bash script that's downloaded from a server and executed not work?

I had a .bashrc which I moved to server so that I can download and execute it through wget. wget -O - http://xxx.github.io/dotfiles/bashrc | bash It does get executed but any functions and aliases ...
0
votes
0answers
23 views

how to detect availability of GUI

For Linux: I have a text mode installation (bash) script and a graphical mode setup program (a Free Pascal binary). I'd like to run the graphical setup when a GUI is available. How do I detect which ...
0
votes
0answers
35 views

xcode install doesn't work from mac teminal

So i'm trying to install the command line tool for xcode, i keep hearing to this xcode-select --install so I get the following output. xcode-select --install Usage: xcode-select -print-path ...
0
votes
0answers
144 views

open file from Cloud9's terminal (bash) in its IDE

What command would open a file in the default editor of Cloud9's IDE from within its own terminal bash shell? I tried xdg-open and gnome-open but those opens in emacs.
0
votes
0answers
68 views

How to setup an array to capture output from ffmpeg volumedetect command

If you query a media file using a command such as ffmpeg -i amediafile.mp4 -af "volumedetect" -f null /dev/null you get output including.... [Parsed_volumedetect_0 @ 0x181d0a0] n_samples: ...