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

learn more… | top users | synonyms

0
votes
0answers
68 views

How can my bash script inherit core limits from a C shell?

I'm using tcsh for my shell. I disable core dumps by running "limit core 0". Running a program that crashes from my shell, I can see that indeed no core dump is generated. Next I have a wrapper ...
0
votes
0answers
35 views

Set X11 to open scripts by default

I am really new to Mac as I don't own one. I have created a ruby script on windows that I like to open an a Mac. I would like to set X11 as default "program" to open scripts instead of the one ...
0
votes
0answers
47 views

How to close login shell (and children of that shell) after unclean SSH exit (e.g. closing PuTTY instance)

If PuTTY window is closed without explicitly ending the session, the login shell and subshells remain in the process tree (note the script.sh was running at the time SSH connection was dropped): user ...
0
votes
0answers
27 views

How do I determine whether a program other than bash is running in a different pane in tmux, and if so suspend it and return to the shell temporarily?

I am trying to write a bash script to script tmux and do things in every pane in my current window. That I have down, but I'd like to be able to know if another window is running the shell or if I'm ...
0
votes
0answers
96 views

automate drive mounting after Cisco AnyConnect client is connected

I have a request to write a bash script for clients to open VPN connection and automount remote drives. I am not sure how to approach it. I figured out I can use "vpncli.exe connect " to connect, but ...
0
votes
0answers
31 views

Checking to see if keycode is assigned in bashrc

I have recently added the following two lines to my .bashrc file: xmodmap -e "remove lock = Caps_Lock" xmodmap -e "keycode 66 = BackSpace" This remaps my caps lock key to delete every time I open a ...
0
votes
0answers
164 views

find files between dates and move to other directory

I have multiple logs file in one of the direcortories, was trying to move them monthly wise to another path. tried below script for the same. for Month in `seq -w 1 12`; do MLDAY=$(date -d ...
0
votes
0answers
49 views

Implement Roll-backing in bash script

I have implemented an Ubuntu package in which bash scripts are using. I followed these for making packages in Ubuntu. ...
0
votes
0answers
404 views

Why gnome-terminal does not show prompt in vnc running on a guest in kvm?

I use KVM to host vm (ubuntu). Then I started vnc4server on the vm. The content of ~/.vnc/xstartup is shown below. gnome-terminal in vnc does not show the prompt and doesn't accept any keyboard ...
0
votes
0answers
191 views

OSX : Find all zip and rar in a selected folder then unzip and unrar

I am in the process of cleaning a huge library of mangas (mostly -but not only- image files ). Each manga has a main folder containing the different volumes, sometimes in .zip, sometimes in .rar. ...
0
votes
0answers
85 views

Change all commands in custom application menu on Debian

so what I have is applications that's supposed to run as root, what I want to do is to add a sudo in the beginning of each command with a single bash script, so I can run these programs directly from ...
0
votes
0answers
227 views

Bash 4.2 on Windows without virtual machine?

I'm looking for the way to run bash 4.2 on Windows without a virtual machine. I've tried with CygWin, but the latest version that you can install is bash 4.1, and I didn't find a way to install bash ...
0
votes
0answers
348 views

Automatically reconnect Openswan/IPSec VPN and disallow intermittent traffic?

I am trying to connect two Debian machines running an Openswan/IPSec tunnel. Also, I want to disallow any traffic when the tunnel goes down. For that purpose I wrote a script the fiddles with routes ...
0
votes
0answers
63 views

Special and diacritic charactres using less, cat and other linux tools

I am using GNU bash, Version 4.1.10(4)-release (i686-pc-cygwin) and set up my .inputrc to allow for special characters and German umlauts etc.: set meta-flag on set convert-meta off set output-meta ...
0
votes
0answers
139 views

How to easily execute last output line in bash?

You probably encuntered the case where a package was not installed and the system was recommending you to install it using apt-get install mypackage. I am looking for a quick keyboard shortcut for ...
0
votes
0answers
78 views

Installing jdk 1.7.0 java -version not working

I have installed java jdk, following the steps as described here but the problem is when i do which jav it gives me the output /usr/bin/java but when i do java -version it says bash: ...
0
votes
0answers
51 views

Take back Ctrl-/ from Debian console configuration

My Debian Testing console is stealing my Ctrl-/ and using it as Backspace; Ctrl-/ is the single key-press Undo in bash and emacs. After some research, it looks like the Ctrl-/ -> Backspace mapping ...
0
votes
0answers
351 views

find and replace in PDF using sed and pdftk

I am doing a mass find and replace using sed and pdftk to find and replace a word in PDF files. When I run the following command, sed -e "s/word1/word2/g" test.pdf I get the following error, sed: ...
0
votes
0answers
257 views

Corrupted broadcast message when system is going to halt in Debian

I have two debian squeezy systems. On first when I've do shutdown or reboot I see correct message, for example: Broadcast message from root@example.com (pts/0) (Fri Jul 19 23:43:32 2013): The system ...
0
votes
0answers
25 views

Run screen splitted and specify commands for each windows?

Ubuntu 12.04, I would like to run gnu-screen already splitted in two regions and with certain commands in it, I have found that in new version of screen there are -Q argument, but I still dont get how ...
0
votes
0answers
77 views

Getting rid of “bash.exe” - from my startup

Soluto reports that bash.exe is taking up 40 seconds of boot time, but I cannot disable it. If I search for it in msconfig, I cannot identify it. If I search for "bash.exe" I cannot identify it. If I ...
0
votes
0answers
589 views

Executing tcpdump remotely while storing packet capture locally

I have run into stumbling block while attempting to create a bash script that will write packet capture files from tcpdump onto a remote server, while displaying the output of the tcpdump command so ...
0
votes
0answers
53 views

How do I script a config file change

I'm trying to create a script to make the vi color change described here http://www.kavoir.com/2009/05/how-to-change-vim-syntax-highlighting-colors.html Trying to do it with sed but it's not working ...
0
votes
0answers
47 views

Can FIGNORE be limited to specific applications?

I know that you can use FIGNORE to remove filename completion from suffixes. For example, to avoid a lot of garbage files produced by LaTeX, I've been using: ...
0
votes
0answers
30 views

Certain actions in Terminal.app in OS X cause noise in audio/video streaming

If I'm listening to something in Pandora or YouTube, and I'm in Terminal.app in OS X 10.7.5, if I use the up arrow to scroll through bash command history, then that works fine with no noises. But, if ...
0
votes
0answers
17 views

rvm cluttering up my environment vars

I was trying to see a list of my environment variables in Bash (Mac Terminal) by typing set. But when I do, I am overwhelmed by a bunch of functions apparently defined by RVM. Is this supposed to ...
0
votes
0answers
68 views

Shell doesn't appear when connecting to RasPi via SSH

I have a raspberry pi with Arch Linux ARM installed. I would like to run commands via my laptop. I configured SSH correctly and I can log in, but I can't do anything. There is no shell. ssh user@host ...
0
votes
0answers
81 views

How to quickly add multiple routes on Mac OsX

After connecting to OVPN, I need to add many routes (more than 3000). It can be done by sudo reoute add X.X.X.X/X X.X.X.X for each one rules, but it's really slow. Is there any other alternative ...
0
votes
0answers
59 views

which program is really running?

I am running a self-compiled version on python2.7, --prefix=$HOME, so as not to interfere with the standard installation of python2.6 (on Ubuntu 10.04). Had some problem importing the ssl modules, ...
0
votes
0answers
212 views

Name of Rake task in ps output?

pid = `ps -ef | grep -v grep | grep rake | awk '{print $2}'` This is a bunch of ruby code that executes piped linux commands. While I usually just use ps aux, just because, I noticed that the rake ...
0
votes
0answers
367 views

USB Modem not getting connected after resetting using usb_modeswitch

I have a requirement that I need to first unmount and then mount again the 3G internet modem on ubuntu 12.04 without removing it physically. The modem model is Huawei E173u. So far, I have tried this ...
0
votes
0answers
371 views

Rotate Outgoing Ip in Postfix, script not working

I've found what it seems to be a nice piece of code meant to rotate postfix IP but I really can't get it to work. when I run it I get this error: rotate_postfix_ip.sh: 2: Syntax error: "(" unexpected ...
0
votes
0answers
73 views

How to set permissions to log files generated after permissions are set

In my shell script I have to access all the log files in the directory. I have set chmod -R 777 to the directory. From this all the log files that are currently available in this directory are set ...
0
votes
0answers
151 views

rsync shell script

Need some hints on my first shell-script using rsync. I use rsync, because I had some trouble with a graphical Backup that ran twice and now I want this example as shown below to work on two external ...
0
votes
0answers
261 views

Force apt-get update to return success

I'm working with a system that invokes apt-get update from a Ruby Capistrano recipe. Capistrano cares (apparently) about the return code of the shell commands it executes. apt-get update is running ...
0
votes
0answers
140 views

Analogue of the “tail -f example.log” command in Windows?

Is there a similar command in Windows?
0
votes
0answers
149 views

Will my weekly cron job work?

I'm just getting back into bash scripting and I want my cron job to run every 15 minutes between 9.15 and 10 PM. I've checked the script works, but I don't know if it's the right command: ...
0
votes
0answers
89 views

Why is a “-1” appearing on right side of my zsh Terminal prompt?

Screenshot here I recently switched over from bash to zsh for my Terminal shell, however after using it for about a week this "-1" started appearing on the right hand side of my window. It get's ...
0
votes
0answers
45 views

Ubuntu pervasive RubyGems

Hey guys I downloaded the Pagodabox gem via gem install pagoda which gives me the terminal command $ pagoda From here I can run all of my fun pagoda commands like $ pagoda -a app tunnel -c ...
0
votes
0answers
432 views

iTerm up arrow autocomplete

Recently, the up-arrow to scroll in my bash history in iTerm 2 stopped functioning as it did before. In the past, if I started typing a command (let's say, `curl') and then pressed up, it would only ...
0
votes
0answers
217 views

Terminal emulation has stopped working. Garbage escape chars

To enable me to do some remote administration of our servers I started using a terminal emulation program called TouchTerm Pro on my iPhone. While not the smoothest experience, it has allowed me to ...
0
votes
0answers
143 views

Terminal highlighting and auto complete

Do you know some plugin for highlighting and autocomplete in postgreSQL terminal?
0
votes
0answers
245 views

bash script rm cannot delete folder created by php mkdir

I cannot delete folder created by php mkdir for I in `echo $*` do find $I -type f -name "sess_*" -exec rm -f {} \; find $I -type f -name "*.bak" -exec rm -f {} \; find $I -type f -name ...
0
votes
0answers
248 views

Make `ssh-agent` use the terminal, not an X app

The ssh-agent X app is irritating. I use a password manager and long random passwords. The password manager (pwsafe) puts the password into the clipboard (using secure ram), so it isn't displayed or ...
0
votes
0answers
593 views

Programmatically backing up SMS on Android

I want to archive my SMS and MMS messages on my Android phone. I found a few applications that can do this and save the results to an SD card or email. That's nice, but not powerful enough for me. I ...
0
votes
0answers
957 views

bash: redirect the stderr/stdout of a running process?

I have a running process running in a bash terminal that is printing some prompt, and I would like to send it to the background with the stderr/stdout prompt that is printing either redirected to ...
0
votes
0answers
214 views

define $HOME variable in gnome-terminal profile (for bash)

How do I do this. I've tried setting this in a script and in the "command" to run at launch in gnome-terminal profile preferences. Additionally, there is a full set of .bashrc .*rc files in the new ...
0
votes
0answers
331 views

how to write a script that will launch java application using the bundled jre?

basically I have MyApplication.jar and a nasty native library that will only work with 32-bit JRE. I bundled the 32-bit JRE in the /JREF folder resides in the same directory as the MyApplication.jar ...
0
votes
0answers
386 views

Vim shell bindings (set -o vi) on iTerm2

Trouble with history when using bash vi bindings on iTerm2 on Lion. (I had the same problem with iTerm when I switched to Lion.) Hard to explain exactly, but when I hit k to go to most recent ...
0
votes
0answers
78 views

Graphics card array to output array - use switch?

I have 3 graphics cards in my Ubuntu 10.04 server machine. I also have 7 monitors. I would like to take an input (a media file), play it on one of the graphics cards, and then be able to ...