A shell is software that lets users interact with the operating system, usually by typing at a command-line.

learn more… | top users | synonyms

8
votes
3answers
26k views

Disable color in shell/terminal

I want to disable all color in my shell. Not ls, not nano, not vi, nothing. What's the best way to achieve this?
1
vote
8answers
11k views

How can I move files from Windows to Linux using WinSCP?

I have PuTTY and WinSCP, but WinSCP doesn't work in this case because I need to use a command cd ../public in order to enter the directory as I can't find it for some reason. How would I use PuTTY or ...
0
votes
1answer
155 views

How do I configure Babun to work with Meteor?

I've tried adding the Meteor plugin in the .zshrc file like so: plugins=(git meteor) I couldn't find any documentation on http://babun.github.io/faq.html that would answer this question directly.
3
votes
5answers
13k views

Windows 7's start menu's search “see more results” is broken

After searching in my start menu and clicking to "see more results", I got an error dialog: It "seems" that it should be search-ms:query=document an not search:query=document but where can I fix ...
0
votes
0answers
16 views

Convert powerpoint to markdown

Can I convert powerpoint to markdown? My ultimate goal is to create an easily versionable version of the powerpoint. (Maybe reveal.js or something)
4
votes
1answer
286 views

one sudo for multiple terminals

Sudo root permissions are given for specific time, but only for one terminal. If I want to use sudo in another terminal in that time period, I have to type password again. How to force sudo to works ...
0
votes
1answer
17 views

bash autocomplete fails with wildcard

Using bash on this this system: Linux 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt20-1+deb8u4 (2016-02-29) x86_64 GNU/Linux The sequence: cd /tmp touch test1.txt && touch test2.txt && ...
0
votes
2answers
14 views

Unescaped commandline content in fish shell

Is there a way to get the unescaped content of command line in fish? I mean if command line is like ... $ ls 'foo' "bar" ... the desired output would be ls 'foo' "bar". The commandline fish ...
1
vote
2answers
46 views

I cant ssh into intel content access point from macbook terminal

I am trying to ssh into the intel content access point with ubuntu 12.4 installed on it from my macbook air, but i get the following errors: ssh: connect to host 192.168.88.1:22 port 22: Operation ...
1
vote
1answer
11 views

How to get piped output in color?

I am using FreeBSD with the csh shell. As an example, in the terminal / screen I get color output for ls (eg. ls -lGs). But when I pipe it through more (eg ls -lGs | more) the output has no colour. ...
0
votes
1answer
1k views

Script to automate copy files with a pattern over network

I am trying to automate some tasks... I have to do some development work on one machine and other parts on another machine, with communication through a network share. I would like to copy certain ...
3
votes
4answers
2k views

Windows 8.1 + Classic Shell, how well does it restore Windows 7's functionality?

I prefer a classic Windows UI. I enjoy Windows 7, but have heard that Windows 8.1, despite its unconventional interface, includes some under-the-hood improvements, such as faster boot times and better ...
3
votes
2answers
33 views

How to check every directory size using one shell command?

I want to get database sizes for - test, mysql, performance_schema, sakila, information_schema [root@linux data]# ls -ltrh 总用量 32M drwx------ 2 mysql root 4.0K 4月 27 17:44 test drwx------ 2 ...
0
votes
1answer
116 views

How to pipe arguments into stdin?

I am trying to generate a private key using keytool command, but it asks me for many details like my key passphrase, my name and my organization details. I want to pass all the inputs in one command. ...
1
vote
2answers
635 views

Is there a way to reverse-search zsh history with more than one search term?

I'd like to be able to reverse-search (CTRL+R) on zsh, but have the commands searched using more than one search term. For example, I'd like to search through commands that included both "scp" and ...
31
votes
4answers
17k views

Setting environment variable for just one command in Windows cmd.exe

In Bash, I can do EDITOR=vim command and command will be run with EDITOR set to vim, but this won't affect the value of EDITOR in the shell itself. Is it possible to do this in cmd.exe?
0
votes
2answers
35 views

Shell Script output indentation

I want to call a shell-script / application inside another script. Every line of the contained script should be indented by 2 spaces. Is this possible? The output should look something like this. ...
0
votes
1answer
30 views

Why does terminal repeat “//: is a directory” after I source .bash_profile?

Sergios-MBP:~ home$ nano ~/.bash_profile Sergios-MBP:~ home$ source ~/.bash_profile -bash: //: is a directory -bash: //: is a directory -bash: //: is a directory -bash: //: is a directory -bash: //: ...
1
vote
0answers
16 views

LibreOffice on OS X: running soffice keeps saying no Info.plist or no NSPrincipalClass in Info.plist

I'm trying to run LibreOffice 5.1.3 from the OS X terminal, to script some conversion tasks. However whenever I run soffice, I always get this error: No Info.plist file in application bundle or no ...
2
votes
1answer
25 views

How to set different shell prompt color for each newly opened terminal

I am using Ubuntu and can manually change the bash shell prompt color to green using export PS1="\e[0;32m[\u@\h \W]\$ \e[m" However, I want the shell prompt color to automatically change whenever I ...
6
votes
8answers
5k views

loading local shell aliases to ssh session dynamicaly

When I log in to some machine using ssh I wish my aliases and functions are there. In other words, log in to some machine I wish I can use my command shortcuts. I need it be dynamic, every time I'm ...
1
vote
2answers
3k views

On Unix, open xls file, and read the content, only the data

Does any one know how to open xls file in shell on UNIX? whether is there any tools to convert XLS to CSV?
1
vote
1answer
27 views

How to use '!!' (double exclamation) in bash script?

This is the scenario: Sometimes I want to open a list of files using vim. That list of files is output of a command. So I can type vim $(!!) and open those files after running that command. Is it ...
1
vote
0answers
40 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 ...
3
votes
3answers
639 views

How to run pip in non-interactive mode?

Most of tools I'm using have some mode (often ON by default) where they ask me zero questions while running the command. apt-get is an example close to pip. There's -y option which makes it ...
4
votes
3answers
1k views

Keeping my zsh or bash profile synced up on all my machines

I work on several different machines, all of which are *nix. I have a lot of specific things I like my shell to, or the prompt to look like, or aliases, etc, etc. I'm sure all of you folks deal with ...
-1
votes
0answers
16 views

Self-contained installer in korn shell script with sed, grep and gzip

There's a great post on this here: http://www.matteomattei.com/create-self-contained-installer-in-bash-that-extracts-archives-and-perform-actitions/ But is uses Bash interpreter, tar and awk. I need ...
0
votes
2answers
391 views

How do I call function after prompt for input in a Linux shell script?

The title says it all. After Im prompted, I want yes and no to respectively call a function. # Check to see if you ran this script before echo echo I need to know if this is your first time... while ...
1
vote
0answers
31 views

Get desktop shell access by wired connection from Raspberry Pi

Today I asked my self if this was possible: Connect a Raspberry Pi to a desktop PC (Ideally to the motherboard, so that the Pi can be hidden inside the case) and then connect he Pi the the Internet ...
3
votes
2answers
69 views

How to start a screen session from a shell script using crontab and then reattach to it?

I want to run the following shell script (launch.sh) to start/stop a screen session using crontab !/bin/bash cd ~/screen DATE_FORMAT=+%Y-%m-%d:%H:%M:%S echo --- START --- date $DATE_FORMAT if [ ...
1
vote
0answers
32 views

Matching a randomly generated integer with a specific place value in a string

In bash I want to prompt user for input in a script. Lets say the input is: #!/bin/bash echo "Please enter a number." read NUM # User enters "12345678" How can I use the next command to generate ...
1
vote
2answers
887 views

How do I run gvim within the same shell window?

I'm running gvim on my mac from /usr/local/bin. If I invoke it from a terminal window it opens it up in a new window. I'd like to get it to just run in the same window I'm already using. How do I ...
25
votes
6answers
17k views

How can I change all files belonging to one user to another user?

I'm looking for a Linux command that can change ownership of all files belonging to a given user, preferably in a targeted directory, to another specified user. My dream command would look something ...
13
votes
4answers
2k views

What is the equivalent of bash's !$ and !! in the fish shell?

I've been using bash for a decade or so and have gotten used to being able to type !$ to repeat the last argument, e.g.: $ mkdir foo $ cd !$ cd foo (That last line is printed by the shell to tell ...
0
votes
1answer
54 views

arithmetic operation on a nested column in a tab delimited file

I have a tab-delimited text file containing Column1...Columnn columns and R1 to Rn rows. Within some of the columns, there are multiple nested fields with an identifier and then separated by semicolon ...
0
votes
0answers
9 views

npm doesn't start, nodejs-dev problems (ubuntu14)

I'm using ubuntu 14 and I installed nodejs-dev and nodejs and that's what appears me (photos below); can anyone help me to fix it? I really need it to continue with my project. I read about create a ...
1
vote
0answers
37 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 # ...
6
votes
2answers
2k views

Why am I having / how can I fix this error: “shell_session_update: command not found”

Background I am getting into Ruby 2.x, and Rails 4.x, on a MacBook using OS X El Capitan (10.11.3), using the fish shell, employing the integration listed on this page: RVM - Fish Shell (Integration) ...
44
votes
4answers
16k views

What is the origin of the UNIX $ (dollar) prompt?

The UNIX prompt uses a $ symbol to indicate that your input is expected. I was wondering why this symbol was chosen—if there is a reason. Dollar just seems a little unexpected. A > symbol would ...
1
vote
2answers
35 views

Source by bashrc when I exit an ssh session

I'm on OS X and using iTerm2 I've updated my bash profile on several of my servers so that when I ssh into them I can tell at a glance from the tabs what boxes I'm on. when I exit from an ssh ...
0
votes
1answer
4k views

ksh Auto-Completion PuTTY Configuration

I'm having a bit of a problem configuring my PuTTY client to work with the auto-completion feature in the ksh shell. I do a listing on the root with the directories /home and /homeroot and it returns ...
97
votes
7answers
178k views

If I know the PID number of a process, how can I get its name?

If I have the PID number for a process (on a UNIX machine), how can I find out the name of its associated process? What do I have to do?
5
votes
2answers
4k views

UTF-8 locale portability (and ssh)

I spend a lot of my time sshed into various machines, all of which are different (some are embedded, some run Linux, some run BSD, &c.). On my own local machines, however, i use OS X, which of ...
0
votes
0answers
25 views

How to have error output from `ls` if target directory is empty

I'm currently learning how to use the Linux shell, getting to grips with the basic commands like cd, ls and pwd. My file structure is like so: user |-- documents |-- file1.pdf |-- file2.txt ...
4
votes
3answers
45 views

Periodically source shell profile

I'm a zsh user, but this should apply to any shell in theory. When I edit my .zshrc to add a new alias, I have to source ~/.zshrc in all of my open terminal tabs/windows to be able to use the new ...
0
votes
0answers
23 views

issue launching atom via git bash shell

I am trying to launch atom from the git bash command line. Sometimes atom has some sort of an auto-update feature where it upgrades itself. And when that happens, you may notice something on the ...
0
votes
1answer
35 views

Changing my shell bash script default $PWD to it's (the script's) current location

Hey I'm running my shell script that interacts with folders and files, but my $PWD that it keeps pointing to /home/MyUserName directory and this messes with what it is supposed to do. I am running ...
20
votes
3answers
3k views

Why does clang generate unintelligible text when redirected?

I am trying to save the output of a command to a file. The command is: clang -Xclang -ast-dump -fsyntax-only main.cpp > output.txt However the resulting output.txt file when opened (by gedit and ...
29
votes
8answers
7k views

Is it possible to restart a computer in response to an email notification?

I'm looking for a way to reboot machines after getting an email notification. The setup I want to use this on is a render farm. We have 5 boxes with 8 Nvidia GTX 980Ti in them. They're running ...
0
votes
1answer
12 views

Pipe in Environment variable in fish shell doesn't execute the first command?

I want to set fish_greeting to date --rfc-2822 | cowsay -f tux | lolcat (don't judge me). When I run date --rfc-2822 | cowsay -f tux | lolcat interactively, I get the proper output (the date in a ...