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

learn more… | top users | synonyms

1
vote
0answers
61 views

Speedup zsh startup time

I'm on MacOS 10.11. When I open a new tab on Iterm2, it takes almost 2 second to have the prompt. So I guess I have something in .zshrc / .bash_profile / .bashrc that takes times to load. Here are ...
1
vote
0answers
14 views

Bash&TMUX - Continue after error

I want to write a bash script which opens new window in certain tmux session, runs another script in it and then closes. The problem is, if I launch two instances of the script, I want the script to ...
1
vote
0answers
11 views

How to use custom configuration file in combination with autostart script in Openbox?

I'm trying to use Openbox with an autostart script as well as a separate copy of "rc.xml" (this is to be able to have multiple configurations on the same computer, but that's not relevant). Let's say ...
1
vote
0answers
16 views

OS X: Trying to run an application in terminal and create an image of it

I am trying to run a program such as tload or slurm which graphs a system metric over time, and make its input into an image that has ANSI color support. The best I can think of is using ...
1
vote
0answers
19 views

How correct this local mail-sender script?

I have a task, write a shell-script, that: - All e-mails, that received by the user specified by the first parameter, sends to the currently running system users; - If sender is online, ...
1
vote
0answers
15 views

Acer Aspire One - Console Opens on Boot "Unable to open Display ' :0.0'

My mother just gave me her Laptop (Acer Aspire One ZG5) and showed me the following: I tried to change the hostname, which should be a solution for this problem, but I've noticed that I havent got ...
1
vote
0answers
43 views

Purpose of function export in bash

If we take a look at the following example: # testing(){ echo hello;} # testing hello # echo $(testing) hello # echo testing >script # ./script ./script: line 1: testing: command not found # ...
1
vote
0answers
19 views

`qsub` leaves “NotQueued ” in “blocked jobs”

I am working on a remote cluster (westgrid > bugaboo) on which I submit processes via a .pbs file. My .pbs looks like this #!/bin/bash #PBS -l procs=1 #PBS -l walltime=100:00:00 #PBS -N ...
1
vote
0answers
44 views

tmux: get names of panes, each current directory and history

my tmux session is a bit broken, by which I mean that tmux ls returns an error like error connecting to /private/var/folders/d0/xbg08_x12lddw3dkht5w462c0000gn/T/tmux-501/default (No such file or ...
1
vote
0answers
20 views

Bash traps not executing on last cmd for scripts passed in with -c

Here's an example: $ (newline=$'\n'; bash -c "trap 'trap ERR; echo handler' ERR; set -e;${newline}/bin/false") The handler will execute if I do any of the following: remove the newline trap on ...
1
vote
0answers
38 views

way to automate git repositories cloning

I have to clone several repositories on the VM-s and then building software on them. I have pretty nice build script but there is one issue. Before build, several repos should be cloned, and after ...
1
vote
0answers
25 views

How can I delete every hourly backup except the 24 most recent ones?

I used to have a server with hourly/daily backups, all readily available thanks to this nice tutorial. Unfortunately, said server fried and I now have to make my backups on a NAS which doesn’t run1 my ...
1
vote
0answers
16 views

linux - append but skip existing data

Being somewhat new to linux, I am trying to copy but append existing information from multiple updated lists under different directories, to the existing files that may have some matching information, ...
1
vote
0answers
58 views

Reproduce “no more processes” error

For academic purposes I would like to reproduce the error message "no more processes" on my bash terminal. For example: $cp file1.txp file2.txt bash: no more processes How can I do that?
1
vote
0answers
54 views

Colon(:) operator in Unix shell

As far as colon is concerned i understand that is is used in certain situations as a null and as a parameter of expansion for substring, but can someone explain me this: do_qc: $(STAGE1_OUT_FILES) ...
1
vote
0answers
47 views

chruby's Ruby $PATH variable changing on its own when current working directory changes?

I installed Ruby and Rails using a guide I found here: http://ryanbigg.com/2014/10/ubuntu-ruby-ruby-install-chruby-and-you/ Notably, this guide uses ruby-install and chruby scripts to allow the ...
1
vote
0answers
110 views

Running `pip` gives 'command not found' after successful Python homebrew install

To preface, I am very bad with the terminal, please be patient with me. when I run pip I get: zsh: command not found: pip I have installed Python 2.7.11 with brew, which should allow pip to work ...
1
vote
0answers
51 views

In Ubuntu use GTK file save dialog from bash command line?

I would like to do something like gtk-file-saver /tmp/tempfile.txt And then a GTK file saver pops up for the user. By this I mean the normal dialog that is used whenever you do "Save As" in most ...
1
vote
0answers
39 views

Is there a name for the command line user interface employed by projects like Git?

There are quite a few command line tools (or suites of tools) out there these days which use a command line interface such that every command starts with the name of the application/tool followed by a ...
1
vote
0answers
19 views

mysqldump via launch daemon on mac osx not working

I'm trying to create a mysqldump of a database via bash script, and automate the process by using Mac's launchd / launchctl process. I can successfully run the bash script manually to backup the db in ...
1
vote
0answers
29 views

Start Git Bash from users directory

I am running the latest version of git on Windows. When I start Git Bash (Running MINGW32) from my start menu it starts git from my users home directory. When I pin the window to the task bar and then ...
1
vote
0answers
18 views

Curl in bash code - produces wrong status

This code seems to ouput a http status of 000 - which seems to indicate something didn't connect properly but when I do this curl outside of the bash script it works fine and produces a 200 so ...
1
vote
0answers
193 views

brew doctor errors - safe to remove files?

It seems that I made a mess as the brew doctor returns a number of errors: brew doctor Please note that these warnings are just used to help the Homebrew maintainers with debugging if you file an ...
1
vote
0answers
88 views

How to ls -l file from output of grep

I was trying to run the following command: ls -lh `grep -E "^log4j.appender.File" /var/domains/*/servers/*/logs/log4j.properties | sed 's/.*=//g'` but it shows me error: ls: cannot access /var/app/...
1
vote
0answers
436 views

Merge xml files using Linux shell scripting

I have 2 files named file1.xml and file2.xml respectively. The contents of the files are: file1.xml: <EJB:Service> <EJB:ServiceId>123</EJB:ServiceId> <EJB:ServiceName&...
1
vote
0answers
77 views

Many cron -f processes on unresponsive server

My Debian server had again become unresponsive and needed to be restartet (SSH login impossible, no longer transmitted log data to another server's MySQL Database, no new FTP connections possible, but ...
1
vote
0answers
68 views

Truncated input when piping to another command in Bash in Mac OS X

I used to be able to handle piping just fine, but recently I’ve been having problems with Bash truncating output when it’s piped into another command. What could be causing this? I'm using Bash on ...
1
vote
0answers
26 views

CentOS - using PXE to install it on my host ( kickstart configuration )

I am trying to install an OS from our server through PXE ( Preboot Execution Environment ). However, on my host, I have two disks say A ( /dev/sda ) and B ( /dev/sdb ) The default installation path ...
1
vote
0answers
72 views

Tree (Linux command): Custom output

In a documentation I saw screenshots of the tree command output like following: In my case I created the filesystem like in the screenshot but in the examples, there were Files and Subfolders in ...
1
vote
0answers
102 views

Get filename from a wget --content-disposition

Inside of a bash script I am dynamically downloading a file and so I use wget --content-disposition to ensure the file names are correct, but how would I go about retrieving the name of the file wget ...
1
vote
0answers
33 views

ulimit seems to freeze bash script

I'm running a bash script that runs multiple small apps with different inputs. Some of these apps have bugs (e.g., never finish) and so I use ulimit to get the output or an error from all of them. In ...
1
vote
0answers
35 views

How do I sort photos from two identical smartphones based on exif data?

Description of Problem: I use Dropbox to synchronize photos from my smartphone to my laptop. I have used a command-line utility in the past called jhead to automatically sort and rename the photos ...
1
vote
0answers
61 views

How to create additional start up script for one service

I installed the package 'gearman-job-server' in Ubuntu server. it creates start up script by default as /etc/init/gearman-job-server.conf. But I want to add more command to same service. So created my ...
1
vote
0answers
51 views

How to quit reverse-i-search without moving the cursor?

In Bash, I often encounter below situation when doing reverse-i-search (using emacs keybinding in Bash): (reverse-i-search:ccc) aaa bbb |ccc ddd I am in the middle of reverse-i-search for 'ccc', and ...
1
vote
0answers
91 views

ESC key does not work for whiptail on CentOS / Fedora

I have a problem with one of my shell scripts. The script starts with #!/bin/bash. It is an installation script using whiptail. I really need the 'ESC' key for at least a whiptail box using the "--...
1
vote
0answers
360 views

How to configure .bashrc for git-for-windows?

I used Git Bash for Windows with Version 1.9.5 on my Windows 7 (64bit). I added a .bashrc and a .gitconfig in my %USERPROFILE% folder (C:\Users\<USERNAME>\). Everything worked fine. Now i ...
1
vote
0answers
73 views

Clean way to automate terminal commands in multiple windows and return to prompt in each?

So, as part of my workflow right now, anytime I pull up a project I open two terminal windows alongside it - one to manipulate and monitor git, and one to manipulate and monitor gulp/grunt. As it ...
1
vote
0answers
25 views

Terminal reset troubles

According to the MinGW setup program, I have the bash shell installed. When I attempt to issue a reset, I get: sh: reset: command not found Bash responds to the reset command in every other ...
1
vote
0answers
114 views

Unable to launch matlab after installation

I have recently installed a copy of Matlab on my Linux Mint distro to a secondary hard drive. I have tried running it in different ways and none of them seems to work. I have tried using sudo, and ...
1
vote
0answers
229 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
500 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
124 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
32 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
85 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
46 views

bash change directory with “shortcuts”

On my windows computer I use JPSofts "Take Command" a.k.a. TCMD as command.com or shell replacement. One tcmd feature I really miss when working with bash on Linux/Os X, is the extended directory ...
1
vote
0answers
133 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
37 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
150 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
62 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
42 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, you have the option to open all ...