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

learn more… | top users | synonyms

1
vote
0answers
124 views

Alternative ways of passing PS1 env variable into Ubuntu for SSH session

I know that there are twenty thousand answers, none of them worked as expected, I'm more surprised than you are, so please consider reading the story first. I'm trying to achieve what appears to be a ...
1
vote
0answers
153 views

PuttyCyg not starting correctly: “Must be connected to a terminal” error message

My computer is running Windows 7 SP1 64 bits with CygWin 64 bits installed and updated (as for 16-Nov-2014). I need to run the screen program of CygWin in a text console. I am trying PuttyCyg, a ...
1
vote
0answers
76 views

Can I use ProxyCommand to run arbitrary commands on a target server via a jumpbox/middle server?

At work, we have a number of servers that we can only SSH into from our jumpbox server. Every now and then I need to execute a command on these servers. For example, if I want to execute df -H on ...
1
vote
0answers
57 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 ...
1
vote
0answers
43 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
208 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
263 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; ...
1
vote
0answers
72 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
54 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
88 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
20 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
60 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
353 views

OSX OSX Mavericks: Cannot login: Corrupt password file: Recovery mode bash not working for resetpassword script

Running OSX Mavericks on Macbook Air SDD disk. The system has corrupted the password file so none of my six identities can log in - password invalid. Following discussions and tests with apple ...
1
vote
0answers
181 views

File or folder not found error, but the file exists

I downloaded the android ADT bundle for Linux(my distro is Elementary OS), and after I unzipped it, I opened the folder sdk/platform-tools on terminal, and tried running the adb file. When running the ...
1
vote
0answers
125 views

How to open a local file with a query string appended to it in the default browser?

I want to do something like this from a shell script: $ open 'foo.html?foo=bar' Sadly that fails, as it looks for a file named foo.html?foo=bar instead of foo.html before opening the browser: The ...
1
vote
0answers
161 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
182 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
88 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
26 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
1k 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
500 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
815 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
469 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
59 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 ...
1
vote
0answers
127 views

mergecap fails to create output file when run from crontab

I have created a script to merge pcap files using 'mergecap -w '. The script doesn't work as the output file is not already present. So I tried to use 'touch outputfile.pcap' before the mergecap ...
1
vote
0answers
36 views

Tab completion that honors $CDPATH

I've installed bash_completion and set my $CDPATH. I can successfully cd to subdirectories of those in my $CDPATH. What I'd like to do from here is for tab completion to bring up files in those ...
1
vote
0answers
111 views

Unintended autocomplete or alias in Terminal

There is a "strange" autocomplete function in my macbook. If I try to type "ps -aux" in terminal (iTerm or TotalTerminal) with the hit of "s" in ps, automatically this happens: "ps -p $$ # Tells the ...
1
vote
0answers
221 views

Writing CPU usage by core and RAM/CPU usage by process to a logfile in OS X

I am writing a script that writes memory and CPU usage to a log file, every hour on a cronjob. The logfile will look something like this: "/n====CPU usage by core====" Core0: 59.05% used ...
1
vote
0answers
57 views

Msys cd .. command takes me to home directory instead of parent

I'm using Msys on Windows 7 with what I believe to be a Bash shell. I want to navigate the following directory structure: Drive (M:) +--- Coding +--- CPP +--- projects +--- ...
1
vote
0answers
109 views

Ncat throws errors while being run from crontab

I have a simple script set up on my OpenWrt box to check if one of the computers in a local network is streaming, and if it does, the script starts wget | madplay to play the stream. Script works ...
1
vote
0answers
58 views

shell script for finding the unix noun phrase

one entry in the on database is: LPE-1*story#1/1 of pearl#1/2*historia de la perla*storia della perla* histoire de la perle* história da pérola*istoria perlei*TOPIC The fields are separated by ...
1
vote
0answers
62 views

Running a symlink locally

I am running the same program multiple times over a linux platform. It is compiled at another server, and frequently updated, and it's uploaded over through rsync to all "hosting" servers, which do ...
1
vote
0answers
48 views

Script to port specifc data from doc1 (notepad++) to specific place(s) in doc2

I really appreciate your help with a windows script or regex function that ports specific data from doc1 (xml in notepad++) to specific place(s) in doc2 (notepad++). I'm running win8. Thank you in ...
1
vote
0answers
220 views

“Script” command in Bash on Mac OSX

quick question regarding the "script" command in Bash on a Mac OSX 10.8.4 system. In any other bash environment on Fedora, CentOS, etc; when I use the script command it just begins recording with no ...
1
vote
0answers
94 views

iWork Keynote: Automate video export with custom settings for multiple files

I have a couple of Apple iWork Keynote presentations and exporting it to Quicktime with my customized settings from within Keynote is straightforward. But here's my problem: How do I manage to ...
1
vote
0answers
150 views

xdotool : close all windows except the one that is active (infront)

I would like to execute a command that will close all windows except the one that is currently active. i would likely to place this command in the gnome-panel which means when i click on the button, ...
1
vote
0answers
99 views

Automatically closing idle windows in Gnome

Can open windows automatically close themselves if they have not been used for X seconds in Gnome? For example, right now I have some Firefox windows and some other file browser windows etc open ...
1
vote
0answers
412 views

How to kill process under cygwin after using kill -9 which does not work

I am using cygwin on Windows7. I tried to kill process on cygwin using kill -9, but it said 'No such process'. $ ps PID PPID PGID WINPID TTY UID STIME COMMAND 3976 ...
1
vote
0answers
105 views

Bash Terminal keeps clearing / overwriting itself

My bash terminal on Ubuntu 12.04 64 bit keeps clearing itself partially when the output is too big. If I do a ls -al in a directory with many files. The terminal prints the result, inbetween it ...
1
vote
0answers
39 views

How to make tab completion work within parentheses

On my Ubuntu machine, I can do this emacs $(which first-part-of-executable<tab> and bash will tab-complete the full executable name. I enabled this myself by adding complete -c which to ...
1
vote
0answers
299 views

ssh Prompts For Password After Account Unlocked - Despite ssh key?

Here's what happened: I set up ssh key so that user could ssh from A to B without a password. I got user's password wrong in some other context too many times, and user's account got locked out. ...
1
vote
0answers
72 views

Bash Shell doesn't recognize the letter “t”

I have Cygwin running on a Windows 7 Box. In what is a relatively new (and strange) development, the bash shell stopped recognizing the lowercase "t". For example: I type echo cat, output is ...
1
vote
0answers
115 views

Getting bash history-complete-backwards/fowards and vi-mode to work with tmux

I'm using bash on Ubuntu 12.04 my inputrc contains: "\e[A": history-search-backward "\e[B": history-search-forward set show-all-if-ambiguous on set completion-ignore-case on"" for my history ...
1
vote
0answers
731 views

File shows different size after copying to another directory

I used cp -rP <dir name> <new dir name> to copy the contents of a directory, including permissions etc from one dir to another. The odd thing is, either du is giving me some strange ...
1
vote
0answers
217 views

Can't seem to connect to Win 7 share with smbclient 3.5.5 on Haiku

I did the registry mods mentioned here but cannot seem to connect. I say seem to, because there's no error message. smbclient \\\\WIN7MACHINE\\ -U myusername smbclient \\\\WIN7MACHINE\\ -U% ...
1
vote
0answers
628 views

bash autocompletion is slow, freezing my desktop

sometimes when working with a custom kernel, pressing tab in the bash autocompletes at a horrible pace. It freezes the whole desktop. Then comes back after awhile. This is the only quirk that I've ...
1
vote
0answers
187 views

bash add array to plist

I'm making a installable package via Cydia that will write com.intelliborn.intelliscreenx to this: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" ...
1
vote
0answers
422 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 ...
1
vote
0answers
52 views

android base64 cli conversion utilities

I want to encode a file into android base64. Android's sdk has a utility method that does this. I should be able to avoid doing any Android programming to solve this. There are utilities for windows ...
1
vote
0answers
57 views

Is this a bug in top?

This command line: top -l 3 -n 10 -o "vprvt" For some reason there are two processes that consistently creep up in the second sample's output regardless of their actual VPRVT size, and they do not ...