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

learn more… | top users | synonyms

6
votes
0answers
221 views

How to disable alternate buffer in GNU screen itself but not for vim, less inside it?

What I would like to accomplish is mouse wheel scrolling behavior that I'm used to in a regular ssh session. In bash prompt mouse wheel should scroll my terminal output, and inside less/vim - the ...
4
votes
0answers
549 views

Local echo using Screen to connect to a serial terminal

Reading through the book "Building Wireless Sensor Networks" I learned that you can use the Screen utility to attach to a serial console. I tried using it to connect to an XBee module and it seemed ...
4
votes
0answers
273 views

bash column command confused by ANSI color escapes

I have a bash script I got from Gary Bernhardt's dotfiles that prints a nice colorized listing of the recent git commits. It uses the column command to line the output up into columns. On my mac, it ...
3
votes
0answers
12 views

GNU screen is slow exiting

I've set up my .bashrc to automatically screen -DRA (even though it's a local session). screen works fine, except that if I run exit from the last window or otherwise close it from the client itself, ...
3
votes
0answers
105 views

scp doesn't work when my .bashrc is echoing to console

Ok, so I have used linux for a long time but this is the weirdest thing I have encountered in a long time. Maybe I just don't do a lot of scp so probably missing something simple here. So in my ...
3
votes
0answers
225 views

Problems with bash script, mysql inserts and launchd

I am developing a automated system, which consists of 3 parts: mysql, bash and launchd. Bash script takes folders of work related stuff, zips, archives and puts info about them into database that is ...
3
votes
0answers
376 views

Process ANSI escape codes before piping

I'm trying to pipe the output of a script (Mocha) to another script. However there is one problem: Mocha generates quite a few ansi escape characters to update the screen on the fly. These characters ...
2
votes
0answers
25 views

Can one start shell from save file dialog

Using ubuntu. If one tries to print to a file, the save dialog opens. Is there a way one can execute the shell (or terminal) from the save file dialog file name entry box?
2
votes
0answers
101 views

Enter a Failed Docker Container with a Different Command

I have a fairly complicated docker container I'm attempting to build. As part of the build process I have I install Chef and have Chef install a number of cookbooks using Chef-Solo. I am having the ...
2
votes
0answers
44 views

Can't resume editor running as root

For years, when I have been working over an SSH connection, I will run sudo vi ... to edit a config file. If I need to do something on the command-line, I'll hit Ctrl+Z to suspend the editor, do ...
2
votes
0answers
25 views

Auto find file parameter in bash

I've been trying to construct a method for bash to auto complete a file argument. so when you type vi not[tab][tab] it auto completes to notes.md if it is within the history or path or gives a list of ...
2
votes
0answers
161 views

Cannot Stat Error When Copying From Android Phone to Ubuntu 13.10

I am trying to move a video file from my phone to my harddrive via a script and am running into trouble with permissions. I am using the following command: sudo cp ...
2
votes
0answers
246 views

Restore Launchpad DB from Backup using Bash/Terminal?

Context: I'm using an OSX shell script to update my settings system-wide after a fresh OS install. One snag I've ran into is restoring Launchpad. I have my launchpad DB backed up via GoogleDrive at: ...
2
votes
0answers
265 views

stdbuf not working while unbuffer does

I am trying to apply timestamps to stdout of a process. For the proper timestamps to be applied, I attempt to unbuffer stdout of the process. This works with unbuffer but not with stdbuf as I would ...
2
votes
0answers
81 views

How can I get bash to perform case insensitive tab-completion for my aliases and functions?

I have a alias like this: alias sshUntrusted='ssh -X -C -c blowfish-cbc,arcfour' when I type: $ sshun bash does not complete this alias I have put set completion-ignore-case on #ignore case ...
2
votes
0answers
243 views

Can I reverse the stream direction of my terminal?

I'm not sure on how to word this question any other way but that's it. Is it possible to reverse the way your terminal prints text? For example if I type a command, I type it from the bottom of the ...
2
votes
0answers
108 views

Trying to bind <ESC> to keysequence “öö” in bash vi mode

I am trying to use the german umlaut "ö" in a sequence "öö" as a binding for ESC. Having the following in my .inputrc does the job with "jj" instead of "öö"; however, when changing "jj" to "öö", it ...
2
votes
0answers
77 views

SoX fails to concatenate *some* newly generated aiff files

I have a Python script that is using Mac OS X's built in speech synthesis API to create aiff files of some processed text via PyObjC/AppKit. Everything is working fine, but I can't get the aiff files ...
2
votes
0answers
219 views

rsync: large exclusion list adding 10 hours to sync

I have had an rsync backup script running on a Centos 6 box that has been syncing ~410gb of data from a local (LAN) server over a gigabit connection. This script runs hourly, and if there are no new ...
2
votes
0answers
385 views

Why does this line appear every time I launch iTerm on my MacBook?

So I use iTerm on my MacBook Air and also my MacBook Pro. I've been playing around with .bashrc and .bash_profile and trying to come up with clever ways to configure things. At one point I decided I ...
2
votes
0answers
485 views

How to mount SMB share from terminal using keychain?

I need to be able mount a SMB share from terminal, for MAC OS versions (10.7). Is there a way to use mount_smbfs with keychain so I don't get prompt the username/password or have to add it to the ...
2
votes
0answers
112 views

sudo: preserve non-std file descriptors

Long story short: why isn't this (simplified) sample working? root:# sudo -C 3 -u regular-user cat /dev/fd/3 3< /var/log/syslog cat: /dev/fd/3: No Such file or directory There is a file that ...
2
votes
0answers
413 views

Copy the output of the last command in Terminal.app

!! | pbcopy would also run the commands again and couldn't be used with interactive commands. This relies on the prompt always being $ : tell application "Terminal" to tell window 1 to history do ...
2
votes
0answers
1k views

Grub: Legacy 'ask' parameter no longer supported

I'm trying to change the resolution on my base shell (the Ctrl+Alt+1) shell in Debian so that it supports my ViewSonic monitor. The shell appears really fuzzy when it is displayed on my lcd monitor, ...
2
votes
0answers
213 views

Branch names not showing in Mercurial's tab completion

I have a development machine running mercurial 1.6.3. Tab completion in bash works great for completing commands, tags and branch names. I've set up a new machine with the same mercurial version (both ...
1
vote
0answers
23 views

Custom script in /etc/rc.local - not starting X properly

I made a script called starter.sh: #!/bin/bash while true; do sudo fluxbox & sudo -u pi epiphany-browser -a --profile ~/.config http://localhost/index.php & sleep 2s done; Which is ...
1
vote
0answers
34 views

Shell Commands not working : REDHAT

I added some service to the startup script and then after reboot , i got this message- 24 package(s) needed for security, out of 52 available Run "sudo yum update" to apply all updates. -bash: id: ...
1
vote
0answers
17 views

Make static site from wordpress site using bash

I have tried a few other scripts that can make a static version of a wordpress site but none of them are designed for bulk sites and I haven't found any that will just serve a static version while ...
1
vote
0answers
10 views

MinGW Git Bash observable progress output inconsistency across machines

I am getting inconsistent behavior across installations of Git Bash on different Windows 7 machines. The diff in behavior is fairly minor, but I'd like to understand what could be responsible for the ...
1
vote
0answers
29 views

RHEL 6 converting a BASH script to a CSH script

I have a BASH script( running on RHEL 6 ) that brings up a GNOME terminal, opens multiple tabs in that terminal, starts a server in each tab, names the tab after that server, and inserts the command ...
1
vote
0answers
15 views

Controlling a Canon Powershot with a CGI/Bash Script

I am trying to control my camera through the program chdkptp by using a CGI/Bash script. I have successfully controlled the camera by typing in the commands by hand: pi@camerapi /var/www/chdkptp $ ...
1
vote
0answers
32 views

Sourcing .bashrc does not enable use of nvm

I'm trying to set up a shell script to run in the context of a user account after the creation of a virtual machine using vagrant; I am a windows user so I've limited exposure to bash scripting. I'm ...
1
vote
0answers
28 views

executing script on remote host by ssh

I wrote a script test.sh (its function is the same as "hostname" command) as below, #!/bin/bash printf "`uname -a | awk '{print $2;}'` " I can get my hostname with source /home/arton/test.sh or ...
1
vote
0answers
38 views

Issue installing Java EE 7 SDK update 1

I've installed Java (jdk 1.8) and set JAVA_HOME, now I'm trying to install Java EE 7 SDK which I downloaded it from here. The Oracle download page shows Universal Zip Installer type file, downloaded ...
1
vote
0answers
31 views

Run bash command from link in browser

Is there a way to run an arbitrary command on OSX by clicking a link in the browser? As you know, there are certain types of hyperlinks that launch certain applications with a specified action, for ...
1
vote
0answers
22 views

How does OS X's Terminal pass the new tab's dir to login or bash?

In OS X, you can add a shell to /etc/shells and set it as a user's default shell, such that when they open the terminal they are presented with that shell. In addition, When you have the option to ...
1
vote
0answers
34 views

Linux: Finding Processes I Started To Kill Them

I am programmatically starting several servers in Gnome terminal with each server in its own titled tab: gnome-terminal \ --tab -t "Server1" -e 'bash -c "export ...
1
vote
0answers
23 views

Stop automatic comments in my crontab

I have added the bellow cron jobs in my crontab : 0 5 * * * /bin/systemctl restart gb_subagent.service 28 13 * * * /home/comment.sh &>/tmp/errorcron.log 29 13 * * * bash ...
1
vote
0answers
69 views

Send keystrokes to two windows at once

What I want to do: Be able to enter keystrokes while one program is in focus, but also send the same keystrokes to a second program on the other screen. What I have tried: xvkbd - I've tried ...
1
vote
0answers
59 views

cp: cannot stat error - when filename has Asian characters

I am simply trying to copy files using cp -r /home/user/source/ /home/user/destination/ but it throws me the cp: cannot stat /source/filename.xxx error for some of the files. When I searched for this ...
1
vote
0answers
31 views

monitor command outputs in separate windows within a terminal

For a list of input text, I want to execute a repetitive command using each element from the list. In addition I also need to monitor the results of each of these commands in parallel. So I am looking ...
1
vote
0answers
36 views

How to show git branch in Emacs shell

How can I show the current git branch as part of the Emacs shell prompt? For example, I have this in my ~/.bash_profile (I'm on Mac OSX 10.9 Terminal): parse_git_branch() { git branch 2> ...
1
vote
0answers
58 views

Can I have server and client on the same machine and run network bandwidth test using iperf?

I have two ethernet ports (eth0 and eth1) on my system. I've tested the bandwidth with two systems and got ~940Mbit/s. If I use one of the ports as server and the other as client, I always go through ...
1
vote
0answers
62 views

Cygwin and Cygwin64 missing prompt in terminal

I tried to install and reinstall cygwin and cygwin64. I also tried different mirror sites. Instead of seeing a line like user@PC~ $, I see a blank screen with a blinking cursor. The properties of ...
1
vote
0answers
45 views

bash Segfault by infinite recursion

I just noticed that the bash I'm using (4.2.25(1)) isn't protected against infinite function recursion. In such a case a Segfault happens (and the bash process terminates). To check this on your ...
1
vote
0answers
20 views

Grep from Log & Calculate then alert

I have a log file, which has the below lines in it. I need a bash script, which takes the values in Bold (4092.1M / 20.1G) & do the math & then alert from Zabbix [Eden: ...
1
vote
0answers
26 views

Bash partial glob expansion

I have a question similar to this one, but different: I want bash to use a glob expansion in auto-completion, if possible. For example, I would like $ ls *2.<TAB> To give me: $ ls mydoc2. ...
1
vote
0answers
65 views

Gnu screen, using the exec command in .screenrc

I have added the following lines to my .screenrc bind -c music u exec amixer sset Master,0 5+ >& /dev/null bind -c music d exec amixer sset Master,0 5- >& /dev/null bind -c music t exec ...
1
vote
0answers
31 views

Top -l returning always 0.0 CPU usage when requesting single PID

On Mac OS X 10.9 (Mavericks) & 10.10 Yosemite I’m unable to get the correct CPU usage for a single process using the top -l command for example top -l 1 -ncols 3 -pid <pid> Even though I ...
1
vote
0answers
136 views

Pacmd dynamic range compression Ubuntu 14.04

I used the answer at the link below to successfully set Dynamic Range Compression on my Ubuntu media box running Ubuntu 14.04 (SteamOS session, so no Ubuntu desktop session available). Realtime sound ...