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

learn more… | top users | synonyms

1
vote
0answers
12 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
1answer
36 views

Starting script in screen with cron

I apologise if this has been asked before but I am not sure how to question a search query for this. I am extremely new to linux and I have been learning as I go to solve issues. I am trying to set ...
0
votes
0answers
13 views

How to make a symlink to make it Compass on my Mac?

I have everything installed on my Mac that should do the job to run Sass and Compass, but it seems that the paths are not optimal. When I installed Compass and Sass I did it by following these ...
-1
votes
0answers
12 views

Concert price finder? [on hold]

I just finished writing a simple bash script that grabs concert dates from the web and gives me date and location next I would like to a script that takes a venu and fuzzes(I think that's the term) ...
1
vote
1answer
26 views

Mouse tracking control codes for terminal using bash

I'm making a bash implementation of curses as an expermient for fun. I use infocmp to get the ANSI terminal codes. I'm a bit stuck now at how to enable mouse tracking in a cross-console way. I could ...
2
votes
1answer
28 views

Replacing a running Linux root filesystem

I'm trying to come up with a bash-scriptable method of replacing the root filesystem on a running PC. The system uses a MBR partitioned disk with an ext4 rootfs and a swap partition, unfortunately it ...
0
votes
0answers
12 views

create and run bash script on start of runlevel5

I have created a following hello bash script: #!/bin/sh echo "Hello Run Level 5" I put this script in the /etc/rc.d/rc5.d directory with a name S100RunLevel5. How can I make this script to run ...
0
votes
4answers
32 views

Copy paste a multiline command into command line

I'm writing a doc about installation of my soft and I have to write things like Please do the following: sudo apt-get update sudo apt-get install python-dev cython portaudio19-dev The ...
0
votes
1answer
10 views

How do I fix a cipher mismatch issue with sftp?

I'm running into an issue where a server was upgraded to RHEL 6.5, and we have automated bash scripts on an RHEL 5.9 install that connects through sftp and ssh commands. Now, the new server only ...
0
votes
2answers
23 views

Open a Command in a New Instance of Various Terminal Emulators

I am trying to open a terminal emulator while simultaneously passing a compound command to it. What are commands for doing this (two versions: where the terminal stays open after completing or where ...
0
votes
3answers
25 views

How can I use the output of ls/grep as input for pdfunite

I want to use pdfunite to merge several pdf-files into one output file. Since the directory contains lots of different stuff, I thought i could use ls/grep to get the apropriate file-names and then ...
0
votes
0answers
16 views

Enable tab autocomplete in PhpStorm terminal on mac?

I am using PhpStorm for a pretty big project. We use Git for our versioning control. Needless to say, this leads to me switching back and forth all day between branches. I'm using the terminal window ...
14
votes
3answers
2k views

Command vs program?

I was looking up the difference between adduser and useradd, and an explanation is that useradd is a command while adduser is a perl script. I understand what a perl script is, but what I do not ...
0
votes
1answer
16 views

Bash not starting in shell properly

When I open my terminal (OS X 10.10.3) I can't run some commands including the commands that are in my ~/.bashrc, but then if I launch bash from that terminal, all those commands work, as below:
0
votes
2answers
24 views

Is there an equivalent to source which allows me to have a batch script alter environment variables of the parent bash process?

My situation is this: I use python with conda on a windows machine, and work mostly in cygwin when on the command line. Now conda allows for different python environments, similar to virtualenv, but ...
2
votes
1answer
22 views

Linux command/script to find all files in a directory with a 4 digit number <= a specific number

I have a folder containing several other folders, each named in this format: Company XYZ (1999 OneWordDescription) I'm trying to filter out the ones that are marked 1995 or older, so I can move ...
0
votes
1answer
24 views

What does qsub --cwd `pwd` mean?

I am newbie to Linux command lines. I just got a queue submission command from others. The command line is as follows: qsub --cwd `pwd` -t 60 -n 1 --proccount 1 --mode c1 --env ...
0
votes
0answers
15 views

Git Bash on Windows 8 open to specific directory except when using Git Bash Here context menu

When I right click and choose Git Bash here it works as expected and the shell launches in the correct window. When clicking just the icon, despite changing the Start In settings, the directory is ...
0
votes
0answers
10 views

Issue with backing up and restoring XAMPP due to unknown software version

I had a ton of permission errors with my XAMPP installation, so I decided to uninstall and start over to avoid hassles with figuring out the correct permissions. I used the XAMPP backup and restore ...
1
vote
2answers
69 views

Edit xml file using shell script / command

I need to do this using unix script or command There is a xml file in /home/user/app/xmlfiles like <book> <fiction type='a'> <author type=''></author> ...
0
votes
0answers
14 views

Process stuck after being put into BG

I'm trying to put a process into background with (Ctrl+Z + bg): [andrey@localhost dir]$ git clone https://github.com/rust-lang/rust Cloning into 'rust'... remote: Counting objects: 465324, done. ...
0
votes
1answer
16 views

LSB init service dependency

I have added the two services A and B. B is dependent on A, meaning that if I will start B then A should be start automatically if it is not running already. But A is not coming up automatically when ...
1
vote
1answer
16 views

Bash script that should do stuff when the first command is CTRL+C-interrupted

I want to make a bash script to automatize a simple task. This task involves running a program (not made by me) which do something until user presses CTRL+C. After that, I have to process the output. ...
0
votes
1answer
23 views

How to recursively compress subdirectory's files with password

I need to recursively compress subdirectory's files with password and then delete the uncompressed file in bash file. There are zip files and other files. I don't want to compress zip files again. I ...
1
vote
1answer
14 views

Make shell script rerun command on certain user input

I'm writing a shell script that randomizes my hostname but prints the random hostname and prompts me if I want to use this hostname for example NEXTHOST=$(sed `perl -e "print int rand(99999)"`"q;d" ...
2
votes
2answers
53 views

pip not working on hombrew python 2.7 install

I've installed python using homebrew and I can't invoke pip from the bash. I've tried amending my .bash_profile to include /usr/local/bin/python and /usr local/share/python to no avail. When I use ...
1
vote
2answers
37 views

Is there a folder-specific .bashrc or .bash_profile?

Is it possible to have a bash script (like a .bashrc or .bash_profile, basically) that is executed only upon cd’ing into a specific folder?
0
votes
1answer
7 views

Distribute session-only git configuration on ssh login

I have a bunch of development servers (linux) that I connect to via SSH from linux workstation. On most of these servers I want to use the Git command line interface. I use a set of Git aliases that I ...
0
votes
2answers
29 views

Creating a bash routine

Everytime I log in into my work machine, I have to open a terminal and type the same routine: $ cd /Documents/some_folder/some_another_folder $ vagrant up $ vagrant ssh I'd like these commands to ...
0
votes
1answer
6 views

Linux remote run a scripts, screen hangs and never back to controls

I have a script in server. If I run it in server locally it is no problem. <user@server> ~ % restart_forms A forms [A] is Restarting <user@server> ~ % However, if I run it remotely ...
2
votes
2answers
26 views

gnu parallel: forward all of stdin to all processes

I'm trying to process input in different ways in parallel, writing out the resulting lines as they come in. My current approach is this: # process_parallel.sh read input parallel --colsep ' ' ...
0
votes
1answer
27 views

Refer to Wildcard in File Name

I know I can use a wildcard to extract files with names of a specific format in bash using the asterisk, like so: $ ls a01 a02 a03 a04 a05 a06 a07 a08 a09 b01 ...
0
votes
1answer
21 views

How to grep through HTML using GNU grep 2.12 and bash 4.2.37?

I've never used grep to parse HTML files, and am having the following problem: grep -Po "(?s)(<h2>.+?<!-- /endcontent -->)" input.html > output.html -bash: !--: event not found I ...
0
votes
1answer
24 views

grep: display all output but highlight search matches

in bash, if I want to execute a command and only display output lines that matches a certain pattern, I can pipe it to grep, like file testfile hello there my friends command $ cat testfile | ...
0
votes
1answer
16 views

separate mappings for TAB and C-i in .inputrc

For what I have tried, "TAB" and "C-i" in .inputrc seems to mean the same thing, whatever I bind to one is bound to the other. I know that originally, it was the same thing and that this behavior is ...
0
votes
0answers
6 views

equivalent of iptables rule in ip6tables

I m newbie in the iptables. I have the following iptables rules in the source code of a project iptables -t mangle -I PREROUTING ! -i br0 -p TCP --dport 45 -j MARK --set-mark 0x1000 iptables -t nat ...
0
votes
0answers
17 views

what the “!” means in the iptable rule

what the "!" means in the following iptable rule iptables -I inacc ! -i br0 -p UDP --dport 69 -j ACCEPT I think is related to the interface br0. I think it mean any interface except the br0 Am I ...
0
votes
1answer
21 views

FreeBSD bash history: can't access last symbol of command

There's an old server I am working with, runs modified FreeBSD 6.1 with bash 2.05b.0(1)-release. On 'up' key press the last command from history pops up - but I can't access the last symbol, like the ...
0
votes
2answers
25 views

Database backup bash working via ssh but not in cronjob

I've put together a script to backup my database on a shared host. The script is as follows: mysqldump --databases [db1] [db2] | openssl aes-256-cbc -a -salt -pass ...
1
vote
1answer
10 views

Problems with function checking if a path exists or not

I am a little new to bash scripting and I was trying to make this program capture a directory path from user and then check if the directory is present. It seems as if the variable SRC inside the ...
0
votes
1answer
24 views

How to show path in shell, but only a fixed number from pwd?

Basically, I want to display something like: me@host.serv.com:../projects/1234/source$ cd cpp me@host.serv.com:../1234/source/cpp$ instead of: ...
1
vote
1answer
16 views

Automated screensaver configuration in command line/shell script

So I'm configuring some Default User Template LaunchAgents to configure a default screensaver for some of my company's most popular fan art. (It's actually been really well received by the team). ...
1
vote
1answer
15 views

inotify script stops after first change

Inspired by this superuser answer I have written the following copy_library.sh script, saved in the same folder as a file called library.bib: #!/bin/sh while inotifywait -e close_write library.bib; ...
5
votes
1answer
83 views

Terminal error messages are not in English [duplicate]

I have Ubuntu 15.04 installed on my machine. Currently terminal error messages are not in English (actually they are in Russian). For example, $ mmmm mmmm: команда не найдена I want to see $ ...
2
votes
3answers
63 views

Can I change my PATH dynamically based on my cwd?

I would like to change my $PATH environment variable dependent on my current working directory. Say I'm in /foo/bar/baz and I have the directories /foo/node_modules/.bin and ...
0
votes
0answers
9 views

Is it possible to run gitbash over windows telnet?

I've got two windows machines, and I can telnet from one into the other just fine. However I use the git bash shell in preference to DOS and I'd like to be able to telnet from box 1 to box 2 and run ...
0
votes
2answers
46 views

How to disable bash drivers in windows 8.1?

I'm trying to follow these instructions to stop Bash Driver BHDrvx86 or BHDdrvx64, but device manager in Windows 8.1 no longer displays non plug and play drivers (such as the Bash drivers), even as a ...
0
votes
1answer
24 views

How to edit one file, but have it update in two places?

What I'm trying to do is make my computer automatically update my backup files when I edit my local files. For example. I have a directory of websites I work on. Each site is its own directory. I ...
0
votes
1answer
22 views

On ssh connection console is looking different with different users. Why?

There are two users on my remote machine. One is olduser, another one is newuser. Olduser ssh console is working and looking differently than newuser connection. There are two folders for each user in ...
1
vote
1answer
26 views

Hiding internal work outputs by shell script

I make a shell script that can update a tools. I want that when i run the root@host:# sh script.sh then the output will be Its installing Its done But now my script look like root@host:# sh ...