0
votes
1answer
15 views

Open gnome terminals programmatically with a script that requires a doublequote

I am trying to use a wrapper.sh script spawn separate terminals for a script that takes params in doublequotes, like so: #!/bin/bash gnome-terminal -e "./script.py -d "somevalueforscriptpy" $1" ...
1
vote
0answers
27 views

How to give each virtual terminal in GNU Screen it's own background color?

I have a dream: I want each virtual terminal within GNU Screen to have it's own unique background color. I think I can fake it in an .bashrc script that emits xterm control codes to set background ...
0
votes
1answer
28 views

Alias to connect to AWS instance via SSH not working

I made an alias to make it easier to connect to my AWS EC2 instance. Although there is an error. Here is the code in ~/.bash_profile: alias aws_connect=‘ssh -i /path/to/keyfile.pem ...
0
votes
0answers
16 views

Abort Printing of Huge Amounts of Text in Terminal

This has happened to me in a variety of instances: Sometimes I accidentally copy/paste the wrong thing into vim, and then I have to wait around 10 minutes for it to print through all that text. I ...
0
votes
1answer
29 views

Terminal command for infinite execution of application

I tried almost every keyword on Google and still didn't came up with an answer. So hopefully one of you knows. What is the terminal command keep a application running after it fails or stopped ...
0
votes
2answers
46 views

In tmux, can I get `exit` to exit the containing terminal window and not the session itself?

So when I open a new terminal (I use terminator on Arch Linux), I have it configured to either open a new tmux session if one doesn't exist, or attach to an existing one. When I type exit at the ...
5
votes
1answer
352 views

How can I perform a second grep on the files returned from a previous grep?

I often find myself searching through a bunch of code using grep in order to pin down what I'm looking for. Sometimes I get a list of files a little longer than I hoped. At this point I want to ...
0
votes
2answers
32 views

Delete Directories that Contain Specified File in Mac OS X

How do I delete a folder that contains a file or folder with a specific name? E.g. I want to delete all folders that contain the file "things.txt": /dirA/ /dirB/things.txt /dirC/ /dirD/things.txt ...
0
votes
2answers
48 views

Crazy terminal behavior

I am trying to run a script to rip all the audio from a bunch of MP4 files. Everything works when I do it line by line cutting and pasting from my text editor into terminal, but when I create a shell ...
0
votes
0answers
45 views

Entered wrong .bash_profile and now my laptop is running hot

I am just learning how to use the command line and was editing the bash prompt setting in .bash_profile. I made an error in the prompt settings in .bash_profile and I lost the prompt and the ability ...
1
vote
1answer
32 views

What's the deal with terminal colors?

There are 256 terminal color escapes available: 8 "system" colors (0 - 7) 8 "bright" system colors (8 - 15) 216, or 6*6*6 "RGB" colors (16 - 231) 24 "grayscale" colors (232 - 255) The "RGB" colors ...
0
votes
2answers
73 views

Is it possible for a root user to watch others' shell session secretly in live?

I see a similar question on stackoverflow: http://stackoverflow.com/questions/1353253/linux-terminal-how-to-capture-or-watch-other-terminal-session Someone recommends conspy. However, it seems that ...
0
votes
1answer
72 views

'localhost' stoped working as an alias for '127.0.0.1' for SSHing into my VirtualBox VM from OSX. Why, and how to fix?

The question explains the problem. For months I've never had any problems along these lines. Then, yesterday morning, I couldn't get into my VM! Took a long time to troubleshoot but here was the ...
0
votes
0answers
23 views

Running Custom commands in a Terminal Application

I am running a terminal application in /dev/pts/X terminal that has its own console as sampleapp> what I need is to run commands specific to this application but from another terminal.
0
votes
0answers
75 views

-bash: java: command not found MacOS 10.7.5

I recently "uninstalled" Java 7 because it isn't compatible with Chrome, following the instructions on this site: https://www.java.com/en/download/help/mac_uninstall_java.xml. Then I re-enabled Java ...
3
votes
4answers
158 views

Terminal: prefix previous command?

Frequently in Terminal (though I fully expect any answer will work in bash and most others), I type some command, and then get some sort of permission error due to missing sudo. Okay, so press 'up', ...
2
votes
2answers
72 views

How can I execute a command and immediately quit the terminal?

It should be pretty clear what I'm trying to do: original script.sh: select blah in foo bar oof rab do cmd $blah break done Pretty basic stuff. The problem arises when I try the following: ...
2
votes
2answers
102 views

sed error when launching terminal on OS X

I get these error messages when launching bash or zsh in standard Terminal.app or iTerm2 sed: 1: "\#^system_type=# { s#^s ...": extra characters at the end of p command sed: 1: "\#^system_type=# { ...
0
votes
1answer
25 views

.bashrc used in gnome not just terminal

I've recently started using the Anaconda Python distribution for software development and I want it to be the default Python distribution when I run something in the terminal. In order to do this, ...
1
vote
2answers
44 views

SSH TERM detection

My ssh config file has accept env set as: AcceptEnv LANG LC_* I am a bit confused how when I ssh through some clients my TERM variable is set as xterm256-color, and other clients TERM is set as ...
1
vote
1answer
32 views

redirect one bash line to stdout/terminal vs log

I have a bash script where I'm redirecting output into a file for logging. if test -t 1; then # stdout is a terminal exec > $OUTPUT_FILE 2>&1 else # stdout is not a terminal, no ...
0
votes
0answers
13 views

sac2xy not executable on terminal osx 10.9

file sac2xy sac2xy: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, not stripped ls -l sac2xy -rwxrwxrwx 1 ravi staff 50334 ...
0
votes
0answers
13 views

How to prevent MacVim from inherenting .profile as if it was Bash itself?

I have this guard in my .profile: if [ -n "$BASH_VERSION" ]; then if [ -f "$HOME/.bashrc" ]; then . "$HOME/.bashrc" fi if [ -f "$HOME/.bash_aliases" ]; then . ...
1
vote
2answers
27 views

Can't run the Python interpreter in Mac's Terminal

At the moment i'm on Mavericks, and i just uninstalled homebrew. With homebrew i had installed python, but after uninstalling it my terminal can't start the python interpreter. I receive this message: ...
0
votes
1answer
50 views

Directories will list, but are not recognize by cd

New to terminal and having problems out of the gate. Using Terminal 2.1.2 on a Mac running 10.6.8. Using the "ls Documents" will list the contents, but when I try to change directories, which I tried ...
0
votes
0answers
26 views

Start terminator terminal in a free spot on my screen

When I start the default Ubuntu terminal, it automatically puts the new terminal in a spot on the screen where no other terminals are there. Now I set terminator as my default terminal. But whenever ...
0
votes
2answers
95 views

Unable to create a permanent alias in Mac OS

In Linux I can well to add alias to bashrc and it will become a permanent alias. In Mac OS I tried to do the same thing: vim ~/.bashrc export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH f or ...
1
vote
1answer
26 views

Is there any way to redraw the text in a terminal window after resizing it?

Just a usability question really. You know when you are working in a terminal window and you decide to do some query that brings back a wall of text and you think to yourself... "that would be easier ...
0
votes
0answers
39 views

Detaching from a GNU Screen suddenly clears the terminal

I feel so stupid for asking this, but here goes: I updated my Ubuntu (Server) install today from 13.10 to 14.04. Before the upgrade detaching from screen did not clear the terminal and now it does. ...
0
votes
1answer
70 views

Issue with RVM conflicting with Brew?

Please bare with me as I am not an expert on bash. In fact I'm fairly new to OSX < 1 year. I ultimately would like your help to get my system configured optimally, thus removing unnecessary tools. ...
-1
votes
2answers
77 views

How can I change the “/” path in linux [closed]

When I type cd /, it changes my directory to a default one. How can I override the current settings so that / points to a different directory.
0
votes
2answers
28 views

Copy shell configuration from one machine to another?

I've got login to another server where shell configurations are not like I would want. For example I don't see my username and CWD on prompt, and when I press arrow key, instead of giving last entered ...
1
vote
0answers
171 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 ...
0
votes
0answers
39 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 ...
0
votes
0answers
33 views

Connecting to ssh and using screen not working properly

I used once ssh -t <login@server> screen -R to connect to a server and everything worked fine. I used the terminal in the server to execute an script and then detach the screen. I came back ...
3
votes
1answer
97 views

Why does my .bashrc get read when I run noninteractive commands over ssh

I've prepended each of my bash config files (~/.bashrc,~/.bash_profile,~/.profile) with echo NAME_OF_FILE, i.e. I get '.bashrc' when I source in ~/.bashrc. What baffles me is why I get and ...
2
votes
2answers
64 views

My cursor is at the beginning of my bash prompt. Any ideas why?

I'm using a slightly modified version of Gary Bernhardt's (destroyallsoftware.com) .bashrc with homebrew bash 3.2.51. # . ~/bin/bash_colors.sh . ~/bin/colorize.sh [... snipped ...] # ...
0
votes
0answers
89 views

Script to open mutliple terminals with multiple tabs each, move and resize these and execute commands

So I am trying to make a bashscript, which does the above mentioned. Background is that I have to keep an eye on lots of logs, and theres have to have opened many console side-by-side. E.g. one ...
1
vote
0answers
44 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 ...
0
votes
1answer
40 views

find files older than create its parent folder in a directory and move them there

I've been trying to create a bash script that does the following. Use the find command to search for files older than 7 days (find . -type f -mtime +7 ! -iname '.*', take the parent directory(of the ...
0
votes
1answer
1k views

$PATH - No such file or directory MAC OSX - Terminal

A million different version of this have been asked already, but I'm still lost, sorry. Here is some of what I'm getting back... In a terminal: $PATH -bash: ...
0
votes
0answers
34 views

Automate whois lookup with Automator

I would like to automate a whois query script using automator. And as I have read from a past Q&A, I've already done this: Get Specified Text xxx.xxx.xxx.xxx Run Shell Script for x in "$@"; ...
1
vote
1answer
25 views

Avoid command dump on terminal when hitting 'Ctrl' twice

Whenever I hit Ctrl twice in my terminal, a list of all the possible commands comes up and it takes some time to complete. How can I prevent this behavior?
12
votes
3answers
809 views

What does . .bashrc actually do?

When I enter a eg. a new alias into my .bashrc file I can't use it in that terminal window immediately and until recently I thought I had to restart the terminal to reload the .bashrc file. Then I ...
3
votes
1answer
88 views

Paste a URL in terminal using bash script on Ubuntu

I'm on Ubuntu 12.04. I need to write a Bash script which would automatically paste a URL to the terminal without having to press CtrlShiftV on the keyboard. The script contains the command: wget -O ...
1
vote
1answer
89 views

KDE Konsole resize window with bash command

I'm trying to write a bash-script that resizes my KDE-Konsole terminal-window when started. But I can't get it to work. VT-Terminal-codes don't seem to work properly. $ echo -e "\e[8;2;20t" shrinks ...
2
votes
0answers
89 views

Coloured commands in terminal prompt

I've customized the prompt in my Mac terminal like this: export PS1="\[\e[31,1m\] \w $ \[\e[0m\] " This way I get the /working/directory $ in bold red, but I also want to get the command I execute ...
0
votes
1answer
69 views

bash directory name with a space in CDPATH

I'm trying to set a shortcut so that I don't have to type a really long directory name so often. In ~/.bash_profile, I am doing something similar to: export ...
0
votes
1answer
72 views

Two process ids for one terminal in bash linux mint

I am running one bash terminal in linux mint. I wanted to see the process ids of running terminal. So I tried two things: ps -C 'bash' ls -l /proc/*/exe | grep bash Both of this giving two ...
0
votes
1answer
57 views

OS X: invalid option -o

When I open terminal I got the following message invalid option: -o. I cannot use /bin/bash --login because I got the same result. I think that terminal try to execute bash login which can't be ...