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
6 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
51 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
17 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
12 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
15 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
35 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
28 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
27 views

Using /usr/bin/env to change directory [on hold]

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
20 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
15 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
39 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
14 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
24 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
16 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
34 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
18 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
22 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
20 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
24 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
41 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
21 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
43 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
23 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
29 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
11 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
20 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
14 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
19 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
47 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>> &>> ...
0
votes
0answers
12 views

How to keep a window on top when the window is generated by a cocoa app? [on hold]

When I launch the cocoa app from terminal, the window generated by the app always stays behind the terminal, is there a way to keep it on top? from the terminal I tried both ...
4
votes
2answers
38 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
13 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 ...
0
votes
1answer
5 views

less -S server.log (unix)

For a better understanding I prefer to read the logs with no wrap lines. In less I can get this with the -S option. The problem is that I can not select and copy rows that go beyond the right side ...
0
votes
1answer
24 views

Change value in config without opening

Is it possible to change/uncomment value in linux configs without opening and go to line? Example: In php.ini we had expose_php = On and we want turn it off: $: magic_cmd "expose_php = Off"
0
votes
1answer
27 views

Search a string between two timestamps starting from bottom of file

I was trying to find a string Cannot proceed: the cube has no data in huge test.txt file only between timestamps yesterday 22:30 pm to today 00:30 am. Script: tac test.txt | awk -v today=$(date ...
-1
votes
2answers
44 views

If we have a collection of Linux computers on a LAN, how to write shell script to shutdown all computer [duplicate]

I have lab and in that ,collection of Linux computer are connected in LAN. i want how to writ e shell script to shut down all PC when we run that shell script.
1
vote
0answers
25 views

Recursive search occurs instead of last command when using up arrow.

I'm using an internal product "shell" based on spring shell. When I press the up arrow to get my last command, instead I get (reverse-i-search)`': Retrieving the last command works for all my ...
2
votes
3answers
174 views

What exactly do the sudo -s command? and how is it used in this example?

I have the following doubt. In a tutorial related to a software installation that I am following say that I have to execute the following commands (I am doing it into an ssh shell, so this list of ...
-1
votes
2answers
25 views

What is the risk when editing crontab file without the “crontab -e” command?

I developed a script in which I add lines to the crontab file with echo command and I remove lines with sed command. I do not know the risk of that especially that I find in some web site that we ...
1
vote
1answer
23 views

Echoing aliases to .bashrc

I want to echo an alias straight into my .bashrc file. Here is what I am using: echo alias cdear='cd | clear' >> .bashrc However, the new line in .bashrc does not contain the quote marks. I ...
1
vote
2answers
70 views

Use alias source with relative path

I want to add an alias file to my project folder to quickly open and edit files in it with a simple shell command. To make it more portable, I would like to use only relative paths. I want something ...
0
votes
2answers
36 views

Using a parameter multiple times in a single line bash command [duplicate]

I occasionally need to run a command such as: mv "very-long-file-name.x" "very-long-file-name.y" I would like to achieve this without repeating the very long file name twice... I know how to do ...
1
vote
1answer
55 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 ...
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 ...
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 ...
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 ...
1
vote
1answer
36 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 ...
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
2answers
100 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 ...