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

learn more… | top users | synonyms

4
votes
0answers
25 views

Tar using progress bar and handling multi-volumes

I'm trying to create a tar of a large LVM volume onto multiple external drives. That part is solved. Now, because it is a LONG process, I'd like a progress bar. From the excellent articles here, ...
3
votes
0answers
223 views

Bash auto-completion af variables adds additional white space at the end

when I perform an auto-completion of a bash variable an additional white space is added at the end. $FO[TAB] -> $FOO" " I added the quotes in order to denote the white space. The problem is ...
3
votes
0answers
310 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
50 views

Strange issue with upgrading bash in Yosemite using Homebrew

I'm running OS X Yosemite. I need to use associative arrays in bash so I decided to use Homebrew to upgrade bash to 4.x. I performed the following steps: brew install bash I then added ...
2
votes
0answers
86 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
202 views

How to register shutdown script on Amazon Linux in AWS EC2

I am using Amazon Linux (RH-based distro) in AWS EC2. I followed the structure of /usr/share/doc/initscripts-*/sysvinitfiles to create an init script in /etc/init.d. /etc/init.d/do_something ...
2
votes
0answers
312 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 ...
2
votes
0answers
580 views

tar: Cannot create symlink : File exists

I backup lots of gigebytes files in to myproject.tar.gz, and compress success without errors. Now, I want to decompress all to an folder "myprojects". adan@adan-Latitude-D630:~$ tar zxf ...
2
votes
0answers
51 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 ...
2
votes
0answers
247 views

Open only the first 10 lines of large CSV file in LibreOffice Calc

I will start receiving many large CSV files, of which only the first few lines are of interest to me. I was hoping to open them by piping only the first few lines to Calc, but this doesn't work: $ ...
2
votes
0answers
85 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
121 views

How can I tell what command is running on the remote end of an ssh connection?

Tl;dr - how do I find the name of the command (eg $BASH_COMMAND) running on the remote end of an ssh connection? ... My example setup is two tmux vertical panes, LH pane runs a local vim session ...
2
votes
0answers
64 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
192 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 ...
2
votes
0answers
179 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
98 views

Is it possible to check which stream is used by the command? (bash)

I have an irritating problem: redirecting stderr does not work. I get: iptables: Chain already exists I can't be bothered to check if a chain exists already (pointless, iptables just throws an ...
2
votes
0answers
167 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 ...
2
votes
0answers
208 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 ...
2
votes
0answers
321 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
425 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
104 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
963 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
204 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
18 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 ...
1
vote
0answers
25 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 ...
1
vote
0answers
22 views

What triggers dropbox on fedora to upload files?

I am writing a computer simulation on a Fedora system, but wants to postprocess the data using MATLAB on a windows installation. My method for transferring files is Dropbox since the two computers are ...
1
vote
0answers
63 views

Unexpected Bash glob completion uses first match even if ambiguous

If I have the following files in a directory: $ ls a-file-1 b-file-2 something-else And I type $ cat *file*<TAB> The line unexpectedly updates to $ cat a-file-1 | (pipe denotes cursor) ...
1
vote
0answers
90 views

How to remove file when over quota without root permissions and truncate, dd, mv, cp, and rm fail?

I'm working on a file system where I don't have root permissions and all of the above have failed to allow me to delete a file with the same errors: $ >file1 $ -bash: file1: Disk quota exceeded $ ...
1
vote
0answers
27 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 ...
1
vote
0answers
67 views

Why isn't “(ulimit -d 1000; firefox) &” working?

I'm trying to limit the memory usage of firefox to prevent it from stalling the whole system with problematic web sites. I tried, in bash: (ulimit -d 1000; firefox) & This should limit the ...
1
vote
0answers
14 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 ...
1
vote
0answers
51 views

popd and pushd behavior with “-n” option

I've been experimenting with pushd and popd in bash (Cygwin, man page says "GNU bash 4.1") and the man page doesn't quite seem to match the behavior. For pushd, the command % pushd +1 both ...
1
vote
0answers
127 views

How can I redirect OS X dtruss output when running with sudo?

I'm running dtruss on Mac OS X 10.9. Simple example is: sudo -c ls But I'd like to capture the dtruss output into a file. I saw something that suggests that I can do something like: sudo bash -c ...
1
vote
0answers
43 views

Recursive search occurs instead of last command when using up arrow.

I'm using an internal product "shell" based on spring shell. When I press the up arrow to get my last command, instead I get (reverse-i-search)`': Retrieving the last command works for all my ...
1
vote
0answers
58 views

Dtrace shows posix_spawn called with only 3 argument. Trying to launch by hand

I ran dtruss on a process that launches another one: the League of Legends Launcher starts the main game process with certain arguments that I can't seem to pass via the command line. What caught my ...
1
vote
0answers
19 views

Reusing _kill completion in .bashrc fails

I'm trying to extend bash completion alias perf-connect-process="perf record -p"; alias pperf=perf-connect-process; complete -F _kill perf-connect-process; complete -F _kill pperf; by reusing the ...
1
vote
0answers
94 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: ...
1
vote
0answers
57 views

Edit text file contain unknown format

I have a text file when I open it with gedit warn me: and when I open with emacs: I have another file with this character and I want to remove this character from that file with a bash script.
1
vote
0answers
28 views

Splitting tar archives and uploading them one at a time

I want to backup my systems to split tar archives with a script uploading them one by one. It has to create the split archive and then run a script. The script uploads the part and deletes it. This is ...
1
vote
0answers
110 views

Unable to access samba file share after mounting on Mac

I am trying to automate mounting, copying a file to a samba shared folder and then unmounting the drive from my Mac. I wrote a simple bash script to do it #!/bin/bash echo "Mounting Drive" mkdir ...
1
vote
0answers
155 views

How can I get Homebrew and MAMP (Pro) to play nicely together?

I am using MAMP Pro for most of my local application development and am trying to install ruby , etc via homebrew however homebrew will give me the following warning: Warning: "config" scripts exist ...
1
vote
0answers
54 views

Terminal's bin/bash not responding

I have Googled through several instances of this issue but cannot get Terminal to open up with bash. I restarted the program, the computer and even logged in through another Administrator account but ...
1
vote
0answers
23 views

Path slashes disappear on coloured bash prompt

So in my .bashrc, I set my prompt to be colourful by setting PS1 to \[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$ For some ...
1
vote
0answers
888 views

What is the different between “sudo su” and “sudo bash”?

In Ubuntu 13.10, for the default setting, the following command in Terminal user@host:~/path$ sudo su results in entering an prompt root@host:/home/user/path# And this command ...
1
vote
0answers
334 views

execl: couldn't exec `/bin/sh'

I accidentally moved the whole bin, boot, dev and etc directory. After moving everything back I get the following error email from various cron jobs: execl: couldn't exec `/bin/sh' execl: No such ...
1
vote
0answers
669 views

Postgresql query within a bash script

We are having an issue with a postgresql bash query. The output of the query from the bash script add's additional quotes around the date. Please can you help me fix it?! Script: #!/bin/sh ...
1
vote
0answers
97 views

Tmux causeing issues with Bash up-arrow

When using tmux, I have issues of ghost characters when using the Up and Down arrow keys in Bash. If I press UpArrow a few times and then press DownArrow a few times, then the first few characters of ...
1
vote
0answers
118 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 ...
1
vote
0answers
358 views

find command with exec sh doesn't work in shell script but in commandline (raspberrypi)

I want to find "old" folders in /volume1/photo/ipcam which are named like "????-??-??" and move corresponding folders within dropbox (with the same directory structure /ipcam/...) to the subfolder ...
1
vote
0answers
55 views

Cron deamon written in shell

I'm looking for a script in bash or ksh, that would do ... more or less ... the same as crond. The situation is, that our system administrator suddenly denied the use of crontab to all regular users ...