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
8 views

Linux cannot work with file “-c” [duplicate]

I have this file created accidently I guess but cannot handle it: -rw-r--r-- 1 root root 329 Dec 11 08:59 -c :~# cat "-c" cat: invalid option -- 'c' :~# cat '-c' cat: invalid option -- 'c' :~# ...
1
vote
1answer
29 views

Environment variables on Linux-like systems

How to set environment variables for a user in most generic way that is independent of shell environment variables (like profile for Bourne-like shells, bahsrc, zshrc, zshenv, ..)? The idea is to set ...
0
votes
0answers
19 views

Windows shell: title command argument too long. How can I enlarge?

I need to change the title of the shell (classic cmd) window in my Windows 7 SP1, but it seems to have a length limitation for some too long strings: C:\Users\Luis>title ...
2
votes
1answer
51 views

Inconsistencies on MD5 checksums

I am trying to obtain the md5 hash of a string. Said string consists of only uppercase and lowercase letters and digits. No other characters, including spaces and newlines. The string is inputted via ...
0
votes
0answers
26 views

How to execute a command stored in a variable or just execute the output of a command? [closed]

Feel free to guide me to a totally different solution, in case there's a more efficient way to do this and I'm just going about it entirely wrong. I'm using Linux based command line on iOS, trying to ...
0
votes
0answers
8 views

Calling guest scripts in Oracle VirtualBox

I'm using Oracle VirtualBox. I want to run a script from the host computer to execute the following steps: Start the virtual machine Execute a script on the virtual machine Close the virtual machine ...
0
votes
1answer
26 views

How can I write a script to kill process that runs for a few hours?

I run python script from cron every hour on CentOS 5 and see some processes keep running for a few hours I would like to run a script every few hours to kill those processes. How can I write the ...
-3
votes
1answer
38 views

Set nano as a default editor over Vim [duplicate]

Every time I login to ssh terminal to edit files I execute the command export EDITOR=nano How Could I set nano as default editor so I shouldn't execute this command anymore
0
votes
0answers
19 views

Piped processes in upstart shell script continue running after stopping

I have an upstart script on my CentOS box that runs a shell script. The shell script runs a netcat command whose output is piped through a couple other commands and then ends up in a file. When I ...
0
votes
0answers
18 views

Configure a default shell script environment

Is there any way to change the default environment when running sh -c <command>? It appears that .cshrc is not called when running command with a -c flag.
0
votes
1answer
53 views

Make Applescript wait for an application to be closed before running a shell script

I have an applet i made using Applescript which opens an Application and then once it's loaded runs a shell script which unload's Spotlight. I need to make it then wait for me to finish using relevant ...
0
votes
1answer
24 views

Copy a file with current date stamp to another location-Shell script [closed]

I have some log files creates in a location like this format. 2015_01_07.stderrout.log 2015_01_08.stderrout.log 2015_01_09.stderrout.log 2015_01_10.stderrout.log (one file is created per day with ...
0
votes
0answers
23 views

How to change default shell for a network user?

I am working with Ubuntu and I would like to change my default shell to z shell. I cannot use the chsh -s /bin/zsh or chsh-s /bin/sh myuser command since my user name does not exist in /etc/passwd and ...
0
votes
0answers
32 views

Error using Putty when connected to a Windows server 2003

I am using Putty to connect to Freesshd running on windows server 2003. I can connect ok, the server log confirms that and confirms shell service is granted. At the putty end I get a terminal ...
0
votes
1answer
43 views

Sed replace line stored in a variable

I need to find a line that starts with mysql.unmetric.twt.url and replace the entire line with line stored in the variable ip. ...
0
votes
1answer
20 views

Bash script failure

I have this script. It works fine on one of system but it's giving some error on another machine: 1 #!/bin/bash 2 EXEC_DIR=`dirname ${0}` 3 source ${EXEC_DIR}/config.sh 4 5 ...
1
vote
1answer
81 views

Variables in linux shell script and user input

Hello I'm trying to make a short script that is supposed to take user input in the form of a file ending like .txt or .odt and type out how many files with that ending the directory contained. So it ...
1
vote
0answers
40 views

Is there a Unicode-aware LC_COLLATE sort order which respects punctuation?

As far as I can tell, setting the environment variable LC_COLLATE=en_US.utf8 changes four things compared to LC_COLLATE=c, regarding how programs like ls will sort files: Unicode characters are ...
0
votes
2answers
19 views

Using “for in” to iterates files but except specified one(s) in shell

I found a post here How can I run mogrify, but prefix the filename? which is talking about resizing a batch of images. In it there's a for in shell script. How do I except some single file(s) while ...
0
votes
0answers
24 views

appying dos2unix on all files under folder

I am trying to appply dos2unix on all files. find $WORKSPACE/itrp-sr -type f -exec unix2dos.exe {} \; but is resulting in an error 1 [main] find 3468 fork: child -1 - forked process 4524 died ...
9
votes
4answers
576 views

Is it possible to print out the shell expansion?

I know there is a specific set of rules that shell expand the commands user typed. (let's talk about bash shell.) Is it possible to print out a command in the form after shell expansion? It seems to ...
0
votes
1answer
25 views

Is it possible to 'source' the output of a python script

I have a large python codebase that knows a lot about my working environment. I would like to use it to set up my ZSH session when i open a terminal window. The python script would output text that ...
0
votes
2answers
33 views

Find availble disk space in unix without parsing `df` output

When I type df -k ., I get the following output Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda2 16512936 8650196 7023932 56% / What I do is tail the last line and ...
0
votes
0answers
11 views

getfattr format output to separate values of files by space or comma

I am using setfattr to store tags of files. Like: setfattr --name=user.tags --value="tag1, tag2" test2 setfattr --name=user.tags --value="tag3, tag2" test3 But getfattr --recursive --only-values -n ...
0
votes
0answers
27 views

How to pass a long list of files to a send-to command?

I have a batch script to perform a task on a list of input files. In order to call the script, I put a shortcut in the sent-to folder. Then I just select some files and select the script in the ...
0
votes
0answers
16 views

How to make an application accessible for ISPConfig's shell user?

We are using ISPConfig to manage our VPS. We have created a domain with a shell user assigned to that domain. There is an application installed on the VPS that is called drush (shell application for ...
1
vote
1answer
31 views

shell:(foldername) doesn't work

I've accidentally deleted two of my user folders - Pictures and Videos on Windows RT 8.1. I've restored them using registration entries. The folders are restored but when I try to search for the ...
1
vote
1answer
137 views

How to update bash on Mac OS X Yosemite

Just trying to learn bash scripting a little. My old bash version: Bash version 3.2.53(1)-release... I've updated my bash on mac os x yosemite with homebrew: brew update brew install bash Then ...
3
votes
3answers
168 views

how to select nth result on command line without using mouse

I got this alias for searching for a file recursively and case insensitive type fr fr is aliased to `find . | grep -i' and so let's say i'm searching for a file fr nsstring+util ...
-1
votes
0answers
28 views

who/Which process is creating a .php file in a given folder?

I am trying to find out, which process is creating a specific file in a given folder. For example, I am trying to find out, Which process creates a .php file in a folder called "uploads". I can do ...
2
votes
2answers
37 views

Executable lauches if called directly from terminal, but does not work when called from shell script

I have downloaded some software (called samtools) and it is stored in a folder on my desktop. Then I've added the path to the executable into the PATH environment variable. In other words my ...
-2
votes
3answers
429 views

Bash- How to make a Linux script file human unreadable? [closed]

I have seen many Linux scripts that are executable but cannot be read as they are in binary format. My question is how I can make my script not readable/binary format?
0
votes
0answers
11 views

Staret managed server using Jenkins

I am trying to start web-logic managed server from Linux system. for that I have one shell script start_wls_managed4_btwnpmd01.sh with following code. ...
2
votes
2answers
84 views

What does @ mean at the end of filenames in auto complete in OS X?

I had yadr installed on my laptop, and I decided to get rid of it by running rm -rf ~/.yadr as instructed by its author. However after I did that weirdness commenced: If I try to edit my vimrc and ...
1
vote
2answers
53 views

Rename files do the tree folder name in terminal, shell mac or shell linux

I'm working with a tree of folders and files with the structure \ Stories \ 00 \ 0 \ 00000 \ temp.xxx \ Stories \ 00 \ 0 \ 00001 \ temp.xxx ... \ History \ 10 \ 5 \ 10552 \ temp.xxx \ History \ 10 ...
1
vote
1answer
65 views

Linux recursive rename files only

I am trying to recursively rename all files within a directory and subdirectories to lower-case but leaving the directory names unchanged. All examples I have found rename both files and directories ...
1
vote
1answer
31 views

Linux bash, command replace

How can I erase the - from clipboard? I have a script: #!/bin/bash xclip -o | replace - "" | xclip Bat this doesn't work So replace \- "" take no effect ]$ uname -a Linux localhost.localdomain ...
0
votes
1answer
30 views

Launch a bash sub-shell and expect a command

From a shell script, how can I launch a bash sub-shell for the user & wait for the user to type exit at the bash sub-shell prompt? I tried bash -c expect -c 'expect "exit" {send "Exiting\n"}'; ...
0
votes
0answers
30 views

Shell command shortcut using input filename as output filename

Hi could someone help me with a little command shortcut please? Im trying to run an ffmpeg command and was wondering if there was a shorter way to type it, Ive been reading up on parameter expansion ...
0
votes
2answers
25 views

how to know if a device is in use in linux

I use several ways move a large size of data (commands, programs in background, nautilus) some times these programs notify me that the process end but I see the led of my devices is blinking, and I ...
1
vote
1answer
25 views

How can we configure paths for .cshrc

Within a shell script, i am trying to open a new tcsh shell and load some set of pre defined aliases and env variables which i do not want to have in default cshrc. I cannot have it in my home dir ...
0
votes
1answer
39 views

WES7 - Custom Shell - How to Install Dependencies

Summary Using the Image Configuration Editor for Windows Embedded Standard 7, how can I install applications before a custom shell is started? Background I'm designing an unattended image for ...
0
votes
1answer
16 views

cd to newest directory

Not strictly bash, but rather Bourne shell if possible. How can I programmatically cd to the newest directory? I want to install the latest package of whatever software, which is located in the newest ...
0
votes
0answers
34 views

Run script on SSH login to server

I'm trying to work out how to get SSH to run a script before passing a shell to me. The reason for this is that I will be logging into shared users on many boxes and I want my own configuration when I ...
6
votes
1answer
89 views

What do these cryptic strings really mean in registry associations?

Looking at my HKEY_CLASSES_ROOT\Word.Document.12\shell\Open\command\command value (Word 2010 'Open' shell association) I see this sort of nonsense: ...
1
vote
0answers
15 views

Triggering KDE's “Attach as tab to” feature from a shell script

I very much like the possibility to attach any window to any other one as a tab in KDE. Particularly, as part of my workflow, I often have a Dolphin (file manager) window attached to a Konsole (shell ...
1
vote
1answer
36 views

Linux unzip: don't prompt user

I need to unzip a file in my nodejs script: var exec = require('child_process').exec; var execOptions = { timeout: 15000 }; exec('bash unzip.sh', execOptions, function (error) { ... }); In ...
0
votes
2answers
44 views

Long commands typed in bash overwrite the same line

Since We updated Bash to 4.3.27 when I type a long command, if it reach the end of terminal window, instead of continuing in a new line, it overwrites over the same line using a ">" at the beginning ...
0
votes
0answers
26 views

tmux' “run-shell” blocks for background processes

I'm using tmux version 1.9a and I noticed that run-shell blocks using of any prefix-key commands until the command terminates. To reproduce this just execute run-shell "sleep 10" and try to ...
0
votes
0answers
21 views

Remove shell user folders from explorer dialog? [duplicate]

In Windows 8.1 x64, which registry modifications I should perform to remove the shell folders from this dialog?