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

learn more… | top users | synonyms

2
votes
1answer
91 views

How to get a shell prompt in NX?

I have installed nxserver on a ubuntu machine and am able to connect to this machine via the free NX client on a windows machine. Things seem to be working fine except that the xterm has a weird NX ...
0
votes
2answers
101 views

How to automate shell script to run when I open a particular app in OSX?

I've been running into a rut recently with one project I've been trying to accomplish. Using Automator, but I don't know how to exactly to go about this project. There's this script editing app called ...
1
vote
1answer
56 views

Why I can't use wget command in SSH shell?

I have the following problem. I am using my RaspBerry (with RaspBian installed) by SSH. My problem is that I can't use wget command because it fails. For example if I try to execute the following ...
26
votes
8answers
77k views

How do i select all text in Vi/Vim?

I always use vi for editing config files. Today I wanted to select all the text in a file (around 1000 lines), copy it, then paste into Google Docs. How can I do that?
0
votes
0answers
26 views

Idle timeout Bourne-style shell

Is there any way to timeout idle users in Bourne-style shell (/bin/sh). man sh does not talk about it. http://www.freebsd.org/cgi/man.cgi?sh TIMEOUT or TMOUT shell env variables in /etc/profile ...
1
vote
3answers
46 views

How do I properly install and organize terminal software on OS X?

I've been learning vim and messing around with installing certain terminal extensions like zsh and tmux. So far I've been installing everything according to their online instructions, and this has ...
4
votes
1answer
458 views

What file is used during login on Unix?

When you log in to a shell on a Unix system there are usually some files that are run in your home directory. You'd use these to, for example, set up aliases and additions to your $PATH. But, how do ...
0
votes
1answer
84 views

Emacs always starts shell in home directory with Windows 7

Running GNU Emacs 24.2.1 (i386-mingw-nt6.1.7601) on Windows 7, the shell command (M-x shell) always creates a DOS box with the home directory. I've seen in other questions/answers that the ...
0
votes
0answers
32 views

How can I add a contextual menu that will work ONLY on files of a specific folder?

I have been looking around and it's hard to find what I want. I know how to add context menus for files of particular extension through registry edit. I need to have context menu for all the files in ...
0
votes
2answers
279 views

Copying without overwriting an entire directory structure in Windows

I need to copy only new files from the source directory structure to the target directory structure. I found that xcopy supports the /y switch to always overwrite and /-y to prompt. Is there a switch ...
6
votes
2answers
3k views

Windows & Git Bash: Bash PATH to read Windows %PATH% system variable

I've recently added a directory to the Windows PATH manually by going into Control Panel -> System -> Advanced system settings -> Environment Variables -> User variables -> PATH. (Windows 7, 64-bit.) ...
0
votes
0answers
19 views

zsh not finding new applications in PATH [duplicate]

In my path, I have rbenv shims followed by /usr/local/bin, then /usr/bin. Whenever I install a new version of ruby using rbenv, applications such as gem and bundle should automatically be find first ...
0
votes
0answers
23 views

How to rewrite bash shell script to nyaos script

I'm using this small shell script named zip0 in linux environment. #!/bin/bash zip -0rq "${1}.zip" "./$1"; I also want to use this function in windows nyaos script. By direct input from shell $ ...
35
votes
6answers
20k views

Reload a Linux user's group assignments without logging out

When assigning a user's secondary group list using: # usermod -G <grouplist> <user> is it possible to force this group assignment to take effect without logging out all running ...
1
vote
1answer
37 views

Bash script to check for shell access

I am working on a shell script to easily manage accounts. I want to have an option to enable and disable shell access (which is easy) but the tricky part is finding if an account already has shell ...
19
votes
3answers
8k views

How to: Unlimited Bash/shell history?

Is there a way to define an unlimited history in Bash ?
0
votes
1answer
53 views

Execute the shell command in subshell or in background?

Actually I mainly work with Ruby, but now I have created a bash script file. From this script file I am displaying the messages on the screen. Here is my scenario. I have used aosd_cat module for ...
0
votes
1answer
43 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 ...
77
votes
7answers
61k views

What does 'source' do?

$ whatis source source: nothing appropriate. $ man source No manual entry for source $ source bash: source: filename argument required source: usage: source filename [arguments] It exists, and it is ...
5
votes
4answers
744 views

How do I combine stdout and stderr for different shells?

I know the answer for some shells, e.g. with cmd.exe you can: some.exe > out.txt 2>&1 How do you achieve the same for other shells (bash, ksh, tcsh, powershell, etc)?
0
votes
1answer
26 views

Check shell Script copy Status

I have a cron script and i need to adjust it; Actually some clients are generating in a directory some files, my task is to backup that files to a tape, and i need to make a if then else cp $files ...
0
votes
1answer
560 views

How can I keep Classic Shell start menu in Windows 8.1 for every reboot?

I have Classic Shell installed, but Windows 8.1 installed its own Start Menu. It really sucks. I tried to use it, but I miss the list of most recently used apps, just typing to find the program I want ...
1
vote
1answer
26 views

extract file content to mutliple files base on match pattern

I am new to unix. I would like to process this file. PP_NAME_1 jprovider|J Driver Provider|${J_DRIVER_PATH}/jcc;${J_DRIVER_PATH}/jcc_license_cu|${J_DRIVER_NATIVEPATH}|com.jcc.Connection ...
0
votes
1answer
73 views

Shell script to check all the URLs from a file or list

I'm looking for a shell script to check a list of URLs and give output. For example: http://abc.com/index.php http://abc1.com/index.php I may place them in a separate file or inside the script. I ...
0
votes
1answer
31 views

get a command process back after closing a session

Arrrgh! I'm using one of those drop down shells (guake, I think) on Linux. I'm dd-ing an SD card, and I accidentilly closed the shell session that was running that command. The light is still ...
2
votes
2answers
122 views

How to recover bash output of an already closed window?

I have run a specific program in a bash terminal and I closed it by mistake before reading its output. Is it possible to recover the information that was sent to the stdout by taking a look at some ...
5
votes
4answers
1k views

BASH history truncated to 500 lines on each login

For some reason, I cannot get my system to keep my BASH history after a reboot. Here are the relevant sections of my ~/.bashrc: shopt -s histappend PROMPT_COMMAND='history -a; updateWindowTitle' ...
0
votes
1answer
28 views

How to use find to fill in variable in Shell script

I am making simple Shell script form some boring-ever-repeating job. Script changes directory correctly, and now I want to run other scripts based on argument I typed when running script. Other ...
0
votes
2answers
24 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 ...
0
votes
3answers
248 views

How to use sed or AWK to separate a string (NOT string in files)

How can I separate .sh files into a list? I have tried: ls *.sh | xargs sed 's/\n/ /g' > out.txt The return of ls *.sh is a long string with '\n' in the middle.
0
votes
2answers
36 views

Is there a way to show “File not found” or a message alike when using the `find` command?

I'm trying to check the existence of several files, without knowing in advance where the files are located. So, I thought of find as the de facto utility to do this... It works as expected, but the ...
0
votes
1answer
59 views

Choosing shell for xterm in Cygwin

Basically my question is closely related to this one: http://stackoverflow.com/questions/21905380/how-do-i-get-cygwin-xterm-to-use-bash-and-not-sh I also want to set bash as the default shell for ...
5
votes
5answers
795 views

How to use _one_ shell globbing expression to list all files (of course hidden files too!)?

Ok, this question targets at Unix/Linux shells! I want a shell globbing- (aka wildchard-) expression that matches all files including hidden files in current directory non-recursively (maxdepth == 1). ...
1
vote
1answer
320 views

Colored man pages but git --help is not in ZSH

I have colored man pages according to: alias man="TERMINFO=~/.terminfo/ LESS=C TERM=mostlike PAGER=less man" so man less looks like but git blame --help is uncolored
0
votes
0answers
33 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 ...
14
votes
3answers
2k views

Multiple standard input? How?

From this commandlinefu post: $ diff <(wget -q -O - URL1) <(wget -q -O - URL2) Seems like multiple standard inputs but---if I remember my Linux Porgramming course correctly---this can't be ...
74
votes
5answers
70k views

chown is not changing symbolic link

I'm trying to change the user/group of a symbolic link with the command: $ chown -h myuser:mygroup mysymbolic/ But it's not changing. I'm logged in as root. The current user/group is set to ...
0
votes
0answers
10 views

How do I get a proper subshell in mc's mcedit?

I can use the shell from mc when pressing Ctrl+O and when using Debian, I can also use that shortcut from mcedit. However, in Ubuntu, this will only show the shell but I cannot enter anything.
0
votes
1answer
49 views

email command not working in UNIX Linux

I tried with 2 email UNIX commands mail and mutt from my Red Hat Linux box. It's not sending any mails to the email id I specified. echo "My message" | mail -s subject "test email" <my valid ...
4
votes
6answers
6k views

Is it possible to gunzip multiple files to a specific directory without deleting the original gz files?

I know this can be done for single files, e.g. gunzip -c my.gz > somedir/my Can it be done for multiple files? [UPDATE] I have a directory with a large number of .gz files (not .tar.gz), and I ...
5
votes
4answers
3k views

Is there a way to edit files inside of a zip file without explicitly extracting them first?

I sometimes need to make changes to a .zip or .jar file, so I usually move the file to /tmp, extract all the files with unzip, edit a few files, and then re-zip up the files. This works, but it can ...
8
votes
8answers
617 views

Per-directory bash/zsh history log files

I find I do a lot of work on a project in a set directory. Sometimes — a few months down the track — I need to redo something on that project but I can't remember what I did. I use ...
3
votes
1answer
64 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 ...
1
vote
1answer
22 views

How can I restrict a bash find to only specific sub-sub-directories

I'm trying to list all the files in a specific sub-directory but different directories which are themselves on a different volume. The following works, but only on a fully specific sub-directory (and ...
2
votes
8answers
7k views

How to find out the top space-consuming directories or files?

My disk is running out of space: $ df -h Filesystem Size Used Avail Use% Mounted on ... /dev/sda7 803G 715G 48G 95% /home I'd like to go through the whole home directory and find ...
0
votes
0answers
41 views

Autoexport bash internal variables

I need to access to some bash internal variables (BASH_LINENO, BASH_SOURCE) from a command invoked by a shell script. The only possible interface between my command and the script are environment ...
8
votes
9answers
6k views

How do I copy file named starting with a dot?

I am trying to copy all files under directory A to directory B. All files under directory A are starting with dot, for example: A/.a A/.b A/.c which I found if I use: cp A/* B, always get error: ...
1
vote
1answer
187 views

How to rename the file name with timestamp of created date by JavaScript, Perl or shell on OSX?

Could you tell me how to get timestamp of created date of file and rename the file name with it by JavaScript, Perl or shell on OSX 10.9.2? Example: Existing: Untitled.txt timestamp is 2014/05/03 ...
3
votes
2answers
1k views

Debian - bash is default shell, but “man sh” gives dash

On Debian squeeze. Running ps -p $$ shows bash is my current shell, ls -l $(which sh) shows sh is a symlink to bash. So why, when I run man sh, do I get the man page for dash? Is this just a bug in ...
6
votes
3answers
633 views

Is there a shell which supports fuzzy completion as in Sublime Text?

I'm using bash and I was wondering if there is any plugin in bash or other shell which allows me to do this cat tfnislong.txt + [tab] completes to cat ThisFileNameIsSoLong.txt just like tab completion ...