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

learn more… | top users | synonyms

4
votes
1answer
397 views

Is there an analog of Bash's Ctrl+Z & fg in Powershell?

I find the combination of Ctrl+Z with subsequent fg on Bash very handy, it's like a command line analog of alt+tab, so I can switch from viewing one file to the output of a running process etc. Is ...
4
votes
1answer
184 views

BASH Completion: Ignore repeated?

I have a bad habit of pressing TAB too many times when using the terminal. If whatever bash completion routine invoked is particularly slow, this causes a huge wait while the terminal shows me the ...
3
votes
1answer
334 views

Raspberry Pi: open browser using bash and crontab

I'm trying to setup a simple bash script. I want to open the browser. chromium-browser <url> works if I do it in the cli or in the bash script if I run the script by ./scrpt. But if I put ...
3
votes
1answer
188 views

Error while installing OpenVZ kernel using yum in Fedora 17

I was trying to install OpenVZ kernel(rhel 6) in Fedora 17.Things worked fine until i issued the 'yum install vzkernel' command.The messages that i get at the end are: Error: systemd conflict with ...
3
votes
1answer
240 views

Accessing a persistent ssh tunnel

How do I pass commands (shell) to a persistent SSH tunnel rather than open a connection for every instance? I have a Python scraper running on a client server which passes URL variables and shell ...
3
votes
1answer
647 views

I/O redirection using cygwin and mingw

I have written a program in C and have compiled it using MinGW. When I try to run that program in Cygwin, it seems to behave normally (i.e. prints correct output etc.) However, I'm trying to pipe ...
2
votes
1answer
36 views

wc / cat command not found

I'm trying to run some simple bash script which uses wc and cat commands. The script fails with this: wc: command not found or this (after I commented string which uses wc): cat: command not found ...
2
votes
1answer
42 views

Automated conversion of .dvdmedia(VOBs) to format Plex can handle on a Mac?

I'm super impressed by Plex, and I'd like to convert all my old dvdmedia files into a format that it can understand. I have quite a few of them (the product of a dvd library being ripped to work with ...
2
votes
1answer
51 views

Record a process's User/System/Real time in Linux/Bash with greater precision

What I am looking for is something along the lines of /usr/bin/time, however, this usually does not have enough precision. I am running a C program (that I can edit and recompile) and I need to ...
2
votes
1answer
629 views

Filter tail command through multiple grep commands to separate files

What I am trying to do is filter the output of one log file into separated log files based on a grep filter. tail -f test.log | tee >(grep "Error" > error.log) >(grep "Warning"" > warning.log) ...
2
votes
1answer
293 views

Running commands and shell scripts in Ubuntu

I'm trying to run a shell script in Ubuntu to flash my Firefox OS phone. I've downloaded and unzipped the new version. I've launched the shell and navigated to the directory where the .sh file is. ...
2
votes
1answer
82 views

How can I have my terminal emulator exit when Emacs does?

This can be considered a follow-up to: How to save shell history from emacs and use it in terminal? I'm trying to force bash to exit with the following in my .emacs file, but it doesn't work, even if ...
2
votes
1answer
320 views

gnome-terminal - color palette

I'm trying to assign color palette on my gnome-terminal but it doesn't change at all... any clue? Screenshot > http://i.imgur.com/MXXhoOo.jpg Aditional info: Fedora 18 64bits (shiny new) GNOME ...
2
votes
1answer
462 views

SSH Session Started from Here Doc Does Not Exit Properly

SSH session doesn't terminate and give the tty back when executed inside a here document. Below is the code snippet that's inside my shell script: ssh -t -t root@$HOST_ADDRESS <<TERM_STRING cd ...
2
votes
1answer
156 views

How to enable the bash history only caching commands that are acutally in path?

Having a bash history enabled is a security risk, because when you accientally enter your password into the bash the password gets stored in the bash history. To prevent this a good solution would be ...
2
votes
1answer
64 views

Print ssh and su chain

Is there a way to show the complete ssh and su chain in bash? For example. In Server A as user aa: su - ab ssh ba@B su - bb Thus, I would like a command that prints something like this: 1 bash aa ...
2
votes
1answer
115 views

Line wrapping issues in bash/php

I am writing a program that prints colored lines, and the more I do with it the more I find myself working around line wrapping issues that come up. It is a sort of terminal written in php, here is ...
2
votes
1answer
571 views

Tab Auto-Completion in Mac OS X when using sftp in terminal

i have been getting very frustrated lately since the readline functionality has been removed from MacOSX and Tab Auto-Completion doesn't work anymore. So i was wondering if anyone knew a good ...
2
votes
1answer
553 views

(-bash: initdb: command not found) When installing postgres mac

I get the following error (-bash: initdb: command not found) in the terminal when trying to install postgres on my mountain lion mac osx? Also, does any one have a good resource for installing ...
2
votes
1answer
90 views

Open application with lowered privileges

I have a mac installer which runs as root with pre and post install bash scripts. At the end of the post install script I launch the application which inherits and opens as root. Is there a way I can ...
2
votes
1answer
2k views

Two parts: linux startup script to connect to bluetooth and cron to keep it connected

I have a mini bluetooth keyboard and a Raspberry Pi running a Debian-based distro. I know the MAC address of the keyboard but for this question, let's just use AA:BB:CC:DD:EE:FF. Right now I have to ...
2
votes
1answer
101 views

How to Mount vbox permanently

On my Ubuntu 11.10 machine, I use vbox (which is again an Ubuntu with source code on it). To take a daily update of a code, followed by testing - have to mount this box with every restart. Tried to ...
2
votes
1answer
269 views

Bash Shell Hangs on ?+Tab-complete

I often use tab completion in Bash when completing directories, but I find that it hangs for an unacceptable amount of time if I accidentally include a question mark in the directory. I'd like to know ...
2
votes
1answer
221 views

Porting GNOME keyboard shortcuts to URXVT

I recently switched from gnome terminal to urxvt (and installed tabbed extensions). I am also a heavy emacs user which uses a lot of key combinations similar to urxvt (tab related stuff) like ...
2
votes
1answer
472 views

Can't start a service (sudo) remotely from script and keep it running

I have a service (tomcat) that needs sudo to be started. I made a simple script on the remote server in /root/bin/test.sh #!/bin/sh sudo service tomcat start read (The script needs to do other ...
2
votes
1answer
800 views

How do I make “bash -x” (debug mode) recurse into sourced scripts?

I'm trying to debug what bash does on login initialization for Linux. I've read that "bash -x" will make bash print out what it's doing, but it doesn't print commands in sourced files like "set -x" ...
2
votes
1answer
363 views

Messy output in zsh working in emacs M-x shell

I have changed my shell to oh-my-zsh, which is working great in iTerm. However when I open up my Emacs, M-x shell, I see it also changes to zsh, but the output from executing commands is messy: ➜ ...
2
votes
1answer
183 views

bash xterm : how to get command line before typing enter

I try to define a custom behaviour of the backward-kill-word function in bash xterm. For that, I need to catch the command line before validate it. For instances, if I type sdcds/edfdD sdf/sdf without ...
2
votes
1answer
276 views

Zsh's yank-pop is not working

In bash, you can kill words (Alt-Backspace) or lines (Ctrl-k), and yank them back later with C-y, and cycling the kill-ring with Alt-y. Now when I'm using zsh, it is weird that Alt-y is not working ...
2
votes
1answer
464 views

Copy files from m3u to destination

I have a playlist, m3u extended, formated like: #EXTM3U #EXTINF:213,2 Tåst - (foo bar) /home/www/Music/Test/test 123 - test.mp3 My problem is, that it seems the line-break is encoded as '\n\r' ...
2
votes
1answer
863 views

How do I mark batch files as executables in bash/cygwin?

In my quest to better my experience in my windows 7 environment, I have installed cygwin and have started using mintty as my command line interface tool. This has been nice and takes me back to my ...
1
vote
1answer
28 views

Different globbing behavior with same shopts?

I have multiple shells (bash) open on the same machine, and in one of them, globbing seems to have stopped. ls * gives ls: *: No such file or directory, and so on. I figured that I must have set some ...
1
vote
1answer
28 views

What's the deal with terminal colors?

There are 256 terminal color escapes available: 8 "system" colors (0 - 7) 8 "bright" system colors (8 - 15) 216, or 6*6*6 "RGB" colors (16 - 231) 24 "grayscale" colors (232 - 255) The "RGB" colors ...
1
vote
1answer
39 views

linux: monitor logfile for a string and execute script

I want to monitor a logfile (syslog) on my linux debian box. So if there is a new entry with a secific string, i want to execute a script. The strings are "alarm start" and "alarm end" So it should ...
1
vote
1answer
21 views

Pipeing lines to repeat commands

If my grep operation returns a list of ID's like: 12345 84758 49549 .. can I somehow feed/pipe each line to a commandline command's parameter? Like for example with the above result from grep, I'd ...
1
vote
1answer
24 views

Ask for password once during dotfile installation

Similar to this question, I'm making dotfiles for setup of a fresh OS X machine. It asks for my password multiple times, since install & system setting sudo commands are in several nested scripts. ...
1
vote
1answer
97 views

Open Google Chrome Specific Profile From Command Line Mac

I have been trying to open Google Chrome from command line but with no luck! I have tried How do I start Chrome using a specified "user profile"? My goal is to open Google Chrome with a ...
1
vote
1answer
65 views

Can't find clogin command for rancid

I'm new to CentOS and setting up Rancid (only used rancid, but new set it up). I've having an issue were I type clogin as my rancid user, however i get command not found ...
1
vote
1answer
44 views

Find last 24 hours executed commands per each user in bash

How can I find last 24 hours executed commands per each user and mail them the result? I have Ubuntu GNU/Linux. I find out that I need a package named 'acct'. I have already installed and enabled that ...
1
vote
1answer
50 views

Firefox - Download files using external bash script

Is possible to issue external bash script when files are being downloaded in Firefox? My goal is high customization. E.g. scripting something that will save files to specified folder based on ...
1
vote
1answer
29 views

Strange probs with popd and pushd

Just when I thought I got popd and pushd, when I tried to practice on my own...it all went to hell. I removed the temp directory.I verified this by going through Finder. Then I made a new set of ...
1
vote
1answer
99 views

How to edit ~/.bash_profile file?

I am using Mac and want to edit the file .bash_profile using a text editor. These are the file's permissions: $ ls -l .bash_profile -rw-r--r-- 1 root staff 55 Feb 24 12:07 .bash_profile When I ...
0
votes
0answers
302 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
326 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
74 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 ...
0
votes
0answers
312 views

Seagate Freeagent Desk Problems according to Disk Utility

I've been having some problems with my Seagate FreeAgent Desk hard drive since I bought it recently, and I'm wondering if it's a hardware problem or a software problem. I'm using Mac OSX, and the ...
0
votes
0answers
420 views

user crontabs don't work, only /etc/crontab

Hi when I use the command crontab -e to set up cron, the commands get triggered (according to syslog) but nothing happens. Also if I run sudo crontab -e. The only way to actually get cron working ...
-1
votes
0answers
11 views

Subversion (SVN) Hookscript for commit messages change (pre-revprop-change) with log

because I couldn't find a useful hookscript for pre-revprop-change with logging and I think my script is a good start point for others, here it's. #!/bin/bash # Requires # Bash (tested with 4.1.2) # ...
-1
votes
0answers
29 views

Bash - monitoring apache logs

The idea is not ban ips listed in ignoreip.txt but the script continues to ban the ips in ignoreip list. Someone help me fix this? In line 52: for IGNOREIP in cat $IGNOREIPS ; do #!/bin/bash # # ...
-1
votes
0answers
29 views

Why Ii obtain this error when I try to compile and install a software on Ubuntu 14.04?

I am not yet a Linux guy and I am going crazy trying to install a software compiling it on Ubuntu 14.04. This are the only provided instruction to install it: Debian First, make sure that ...