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

learn more… | top users | synonyms

0
votes
0answers
3 views

path setting appears twice in env output

After an OS version upgrade I have the following strange problem: % port MacPorts 2.3.1 ... % sudo -i # port MacPorts 2.3.1 % sudo port sudo: port: command not found Furthermore, if I do it all ...
0
votes
1answer
29 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
13 views

How to execute a long shell command with parameters in Python? [on hold]

This is a shell command that makes an xml from a pcap file: tshark -r something.pcap -T pdml > someting.xml I want to write a python script that does this automatically with all the pcap files ...
5
votes
1answer
42 views

Why there is an empty line begin with “*” in the result of history command on linux?

Today at work, I wanna know a history command which I am not very familiar with and I was sure that I just executed a little while ago. However, when I ran history on the same terminal window, I found ...
-3
votes
0answers
28 views

Why does windows not come with a Bash shell? [closed]

A bash shell is a pretty standard feature of a modern operating system but it is not part of Windows? Missing this is like missing a internet browser and makes a huge portion of work impossible. I ...
0
votes
1answer
13 views

Tried Installing ZSH through cygwin and then trying to use zsh through Cmder

I tried to install Cygwin (64 bit version) on my computer, and it went through hunky-dory until at the very end, autorebase.bat failed with exit code 1. I read through the logs and they weren't too ...
0
votes
1answer
11 views

psql ignores my PAGER variable

I want to use less as my default pager. Therefore I have PAGER=less in my .bashrc. It's sourced properly: $ echo $PAGER less However, psql still uses more if I call it with psql. BUT: If I call it ...
0
votes
1answer
14 views

exiting current terminal in a script

I have made alias for running certain program and i have put it in .bashrc file. I want to close current terminal inside the script. I've tried this but it is not working. alias mp='java -jar ...
-2
votes
1answer
22 views

how to run command in another terminal in Linux script

In Linux shell script I have to run few commands under another user but I am enable to. Please advice some suggestions. $ jumpto -T -u ... after this command it enters in another terminal and I ...
1
vote
4answers
44 views

How to rename a lot of files in bash shell?

Sorry for the question. I searched the internet a lot, but couldn't find an answer which worked (though there were a lot of suggestions). So, I want to rename A LOT of files. Writing all file names ...
0
votes
1answer
20 views

Small bootable package to enable ssh client?

I've been trying to find the smallest possible package to put on a cd/thumbdrive that will allow me to use an ssh client on a wired networked computer. I'm talking about really barebones stuff, no ...
0
votes
1answer
23 views

stop all child processes when 1 of then returned exit code 1

I have 2 or more build processes to run in background. I want to stop all the build processes if one of them exit with code other than 0. ./build-1.sh & ./build-2.sh & ./build-3.sh & wait ...
0
votes
0answers
20 views

Access script arguments from within script [duplicate]

I have a script that I can run like this: bash myscript.sh -ram 4096M -jar something.jar -dir /home/something I would like to be able to access the variable ram, jar, and dir from within the script. ...
0
votes
1answer
30 views

CentOS 6 - Send user defined command from PHP

I have a web control panel and I need my allow my users to send commands to their application. I a similar problem to SQL injection. $user_input='good command'; shell_exec('tmux send-keys session1:0 ...
1
vote
1answer
29 views

Batch convert txt file encoding

I have about 700 files that were the results of a closed caption software process. I can open the files on my PC or Mac in a GUI, but when I open it on the server with nano, I get this: ...
0
votes
3answers
42 views

Starting programm into window manager

Is there a way to start a program from a terminal, that is not a "child" of the window manager (p.e. XFCE), into a window manager? The executed program has to be detached form the terminal (and my ...
1
vote
1answer
27 views

Different globbing behavior with same shopts?

I have multiple shells (bash) open on the same machine, and in one of them, globbing seems to have stopped. ls * gives ls: *: No such file or directory, and so on. I figured that I must have set some ...
0
votes
0answers
11 views

Apply new Windows shell context menu item to encrypted files

I am trying to add a context menu item which will only appear if a file is marked as being encrypted. With an AppliesTo entry, I can successfully apply the menu item to only text files with ...
0
votes
0answers
10 views

mc-wrapper does not exit to MC_PWD directory

I recently installed openSUSE 13.1 and set up the mc in typical why by aliasing mc with mc-wrapper.sh to have it exit into the last working directory in mc instance. However this does not seem to be ...
0
votes
2answers
61 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
25 views

Bash doesn't source file unless manually started

bash won't source files from an login terminal unless I manually run bash from a terminal, I have bash (and not sh or dash). When I source a file, it returs errors (like "syntax error near unexpected ...
-1
votes
1answer
13 views

Record directory sizes on shutdown

What would be the easiest way to record and store the sizes(and a timestamp) of a few chosen directories upon each shutdown - say in a .csv file.
1
vote
1answer
23 views

Using fdisk -r to read disk in Solaris

Upon reading the fdisk's man page on Solaris, I came across the -r flag: -r Read from disk and write to stdout. See -o and -s, which specify the starting point and size of operation. Using ...
1
vote
2answers
38 views

Execute a previous command in a shell and get the command directly after

Once, a colleague of mine shown me a very useful method (shortcut?) on a shell (bash? csh?) to, after executing a previous command, automatically show the command after in history. For example, ...
-1
votes
1answer
38 views

Run shell script (.sh) from wine

I am new to the wine community. I need some help with a project I am trying to do. I have installed Wine over Ubuntu 14.04 and I have installed ffmpeg on my machine (ffmpeg as a linux program). I ...
-1
votes
1answer
35 views

Using /usr/bin/env to change directory [closed]

I want to automatically execute commands with the prefix /usr/bin/env $/usr/bin/env composer install (this runs OK) $/usr/bin/env cd public (failed ---> /usr/bin/env: cd: No such file or ...
0
votes
0answers
21 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
2answers
18 views

Piping Several commands in a BASH shell

I am trying to recursively loop through a directory which contains numerous other directories and files and then find all the .rb files and copy them to another directory. This is what I have so far ...
1
vote
2answers
45 views

Equivalent of (foo &>/dev/null &) in Windows shell

I'd like to run a particular application (let's call it foo) from the command line, but I don't want it holding up the terminal, putting any junk in the terminal from its output or error streams, and ...
0
votes
0answers
29 views

is the chromebook developer mode shell a fully capable linux shell

I have enabled developer mode on my chromebook. Is the command line shell a fully implemented linux shell? Would there be any point in installing something like ubuntu?
1
vote
2answers
26 views

Start application from a numbered list of choices

I want to display all applications dynamically within a folder in a numbered list, and launch them by entering the number associated with the application. So far I have the easy part working, the ...
-1
votes
0answers
17 views

How to change the minimize window function?

This is COMPLETELY out of my element. I have absolutely no idea what I'm doing here, googling hasn't been any help. Essentially, I want to change the minimize window functionality. So when I click ...
0
votes
1answer
23 views

What's the difference between --param=“value” and “--param=value”?

In the past I've read (can't recall the source) that: ./script --param="value" can have different results compared to: ./script "--param=value" and that due to these differences (which might ...
0
votes
1answer
42 views

How to escape “!” and “&” in docker's environment varibles

I have a docker container I want to run and hand it over some passwords. One with an exclamation mark ! and the other one with an ampersand &. So I want to run this: docker run -i -t --rm \ -e ...
0
votes
0answers
19 views

Win 7 - default commands upon starting shell [duplicate]

Is there any way to set "default commands" that would be executed whenever a windows shell (cmd) is opened? E.g. I like to execute "prompt $g && cls" before doing anything else. Can I ...
-1
votes
1answer
24 views

how to escape '$' in an awk statement in shell alias

I'm trying to write an alias that will kill all running php processes.. this is the command i got in my ~/.bash_profile alias killphp="ps aux | g [p]hp | awk '{print $3}' | xargs kill -9" this ...
1
vote
1answer
22 views

realpath (GNU coreutils 8.22) does resolve “.” symlink regardless of “-s”

I'm trying to use realpath in a script which has to ensure that it is located under a certain (possibly symlinked) path. Also the script has to be runnable from any location, so it cannot presume that ...
0
votes
2answers
30 views

How to save the stdout and stderr to a file while still seeing the output?

I'm trying to debug a program that generates a lot of data. But the event which I want to debug happens after a random amount of time (I cannot force it). So I would need to see the stdout and stderr ...
0
votes
2answers
46 views

change shell of a user from /bin/false to another

I made a mistake of change the root shell to /bin/false, but when I want to change it back, I always got error sudo chsh -s /bin/bash root [sudo] password: <input current user password> ...
0
votes
2answers
27 views

“Less” prompts for “binary file” display when colors in output

We've recently enabled colouring the log files of a few services, I believe we use ANSI escape sequences for that. Looks like this: [2014-06-12 10:56:43,214] [main] [VOID] ESC[34mINFO ESC[0;39m ...
2
votes
2answers
45 views

How do I handle multiple quotes in an alias (for bash or zsh)

I am using zsh, and I am trying to use python as a simple calculator. I'm very familiar with python, but can't seem to get the alias (or function) to work properly. So far I've got: pycalc() { ...
0
votes
0answers
27 views

Run shell script/start Junit test in android without PC/ from SD card

I have a Robotium Test case, which is an instrumental Junit test case, and I can run it from the command line from my pc using the following shell script : adb shell am instrument -w ...
0
votes
1answer
31 views

Skip keychain without skipping the rest of .profile

I am using the keychain ssh-agent wrapper from funtoo.org. I have it loaded automatically by adding an eval line in my .profile. E.g.: eval `keychain --eval id_rsa github bitbucket` Sometimes, I ...
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 . ...
0
votes
1answer
27 views

Batch APPEND (RENAME) a specific keyword to set of files

I have few files namely - "a", "b", "c",etc.. I want to add the keyword: ".mov" to all files in that folder. Please suggest me an approach which script will be best suited for this - AppleScript, ...
0
votes
1answer
17 views

Why doesn't __git_ps1 work in bash anymore on OSX with MacPorts?

After updating Macports today, I get -bash: __git_ps1: command not found. Why is that?
0
votes
2answers
23 views

Batch TRIM (RENAME) a specific keyword from set of files

I have few files namely - "a.mov-, attachment", "b.mov-, attachment", "c.mov-, attachment",etc.. I want to trim the keyword: "-, attachment" from all files in that folder. Please suggest me an ...
0
votes
1answer
49 views

/dev/zero or /dev/null for redirect?

I understand that the standard to redirect to is /dev/null, but why not use /dev/zero? Does it not have the same effect? Another question, what do all the 1>> 2>> &>> ...
4
votes
2answers
49 views

shell script to replace a keyword in a file with the contents of another file

I'm to create a .sh to replace a specific keyword in a file using the contents of an other file. template.html contains a unique string "PLACEHOLDER" it must be replaced with the contents of file ...
0
votes
0answers
15 views

How to accelerate a shell script for a mongoDB application?

I started shell scripting for my work, but I must admit I'm still far away from even being a rookie. Therefore I wanted to ask you for your help/advice. I build a script for a big data application ...