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

learn more… | top users | synonyms

1
vote
2answers
176 views

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

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
6 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
58 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
39 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
39 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
23 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
17 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
27 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
20 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
10 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
0answers
19 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
24 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 ...
7
votes
1answer
69 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
12 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
27 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
1answer
23 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
11 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?
0
votes
0answers
7 views

Restrict shell (sh/bash) to a list of allowed parents?

Does anybody know whether is it possible, without modifying the source code, to restrict shell execution to a list of "white-listed" parent processes (in practice getty, x-term, sshd, /sbin/init or ...
1
vote
1answer
37 views

WinRar - Custom shell commands

i'm trying to create custom commands on the context menu in windows. i found this great registry hack here: https://superuser.com/a/376879/395548 this is the code made to work for me: Windows ...
-2
votes
2answers
46 views

linux ^C command to kill process [closed]

^C doesn't always work to kill or terminate(involuntarily) the current process (for instance, if that process is busy in certain network operations).
0
votes
1answer
11 views

Including and excluding in one regular expression

We're using HP SiteScope system at work to monitor logs and get alerts when a special string or combination of strings is caught. There is one field where the regular expression that catches the ...
0
votes
1answer
15 views

i need to pass a string of an output file to a variable so as i can use it globally all over my script [closed]

sample output RETENTION_INTERVAL ------------------ 10080 I need to pass the numeric value "10080" from the output file to a variable .The condition should validate value and ...
0
votes
0answers
19 views

Bash script monitor file modification after its closed

It has already been asked here and I have found the solution for the first part of my question. So for the moment I have a bash script (script1) where I evaluate the sha1sum of a specific file ...
0
votes
0answers
28 views

midnight commander subshell - sharing a history file with the shell mc was started from

I am looking for a way to make midnight commander share its subshell history with the parent shell. To be more specific, when I start mc, open its subshell using Control+o and subsequently invoke a ...
0
votes
0answers
20 views

.inputrc: Delete word on option-forward delete? (OS X)

TL;DR: In my .inputrc, how do I enable the forward delete key (in conjunction with the option/meta key) to delete by word? Introduction Lately, I've been working to perfect my shell setup. I ...
0
votes
1answer
13 views

How can I configure the cancel button of dialog box bash?

dialog --backtitle "Dialog - Form sample" \ --form " Form Test - use [up] [down] to select input field " 21 70 18 \ "Network-ID:" 2 2 "" 2 15 20 0\ "Subnet Mask:" 4 2 "" 4 15 20 0\ thank you for ...
0
votes
3answers
49 views

What does this use of the echo shell command do?

I found echo -n $'\e]0;Hello World\a' in a shell script that's part of a code base I'm working on. What exactly does that do? It certainly doesn't echo anything visible. Note, I'm using Ubuntu ...
0
votes
1answer
17 views

disable users from creating new shell instances

Is there any way I can disable users from creating new shell instances through sudoers file? also disable them to set any environment variables? I would like to write a line in the sudoers file ...
0
votes
1answer
39 views

Ubuntu nested bash shell

Thanks for any help. I'm helping configure a machine to log keystrokes using /usr/bin/script function. For each session, a log file is created that includes the POSIX time. $PS1 is changed to reflect ...
0
votes
2answers
63 views

How to store results of multiple sql queries in shell variables in Bash?

I need to store in array the results retrieved from the database. So far this is basically what I'm trying with no success. Myarray=$(echo "SELECT A, B, C FROM table_a" | mysql database -u $user ...
0
votes
2answers
19 views

Output redirection at the beginning of line

I'm used to specify output redirection on the end of the line like: echo blah > output.txt Both in Windows and *nix. Recently I'm seeing more and more examples that redirect at the beginning of ...
1
vote
1answer
21 views

Yum batch install package cause 100% CPU load?

I need to install a list of package as follow; so I made a small script automate it: yum -y install libstdc++.i686 yum -y install libibcm.x86_64 yum -y install librdmacm.x86_64 yum -y install ...
1
vote
1answer
19 views

Is there an event fired right after a command finishes executing?

In Bash, after you type in a command (e.g., ls), it will execute the command, which will write its standard output (if not redirected) to the terminal (in our example, the content of the current ...
0
votes
0answers
21 views

Parsing XML log in shell

I have to parse a very large log file and I want to use the command grep (or any other tool). I am currently using PuTTy. I want to search for each log line for a specific string (let's call it AWB) ...
2
votes
5answers
224 views

UNIX how to resume process using ID?

I have a problem to resume process. I tried to get process to foreground using jobs, it works, but if i close shell and start it again. In this case i haven't my process in jobs list. I know just ...
0
votes
0answers
29 views

adb shell dumsys cpuinfo

DUMP OF SERVICE cpuinfo: Load: 9.39 / 19.22 / 14.77 CPU usage from 13119ms to 6195ms ago: **25%** 5442/com.gameloft.android.ANMP.GloftA8CN: **17% user + 8.3% kernel** / faults: 39 minor **21%** ...
0
votes
1answer
41 views

Shell script force stop without waiting for the exit code

I have written a shell script checklick.sh on my CentOS box with the following content: #!/bin/sh # # description: check link through rtmpdump # . /etc/rc.d/init.d/functions ...
3
votes
1answer
43 views

How can I check if timezone has changed in a bash script?

I have a shell script that runs via crontab, but the commands in it are timezone dependent (they refresh a table in database everyday. If the script runs during the time of a DST change, it will ...
0
votes
1answer
27 views

Damaged preference file in /bin/sh

Today in Drive Genius 3, I ran the “Verify Preferences” function in Repair. It yielded this strange result: /bin/sh: xargs: command not found The only option Drive Genius gives is to remove the ...
0
votes
0answers
18 views

Shell unbuffering for CygWin: is it possible?

I have tested on CygWin doing "ls -R" with a large directory and sending the output to a Test.txt file, so the process takes about 30 seconds to complete; the file is created, but it is empty; it will ...
1
vote
2answers
49 views

Status line in linux shell

I use Windows and Putty in order to remotely connect (ssh) to some linux servers. I have set my hardstatus in my .screenrc file so that I can monitor some useful information. But this works only when ...
1
vote
1answer
23 views

Search for string and read the next line

I need to write a shell program that installs some packages. The program will run on Linux (obviously some commands will not work, for example, on Arch-based distros). So, I've got this file called ...
0
votes
1answer
35 views

processing sequential and parallel jobs in bash script

I understand that in bash programming, comamnd1;command2;command3 will run them sequentially while command1&&command2&&command3 will run them in parallel. However what happens when I ...
0
votes
0answers
15 views

How to revoke myself rights to write files outside current directory?

I want to make sure commands that I run from my shell cannot damage my files above starting directory. For example, this command should fail: cd ~/ && rm -rf *. Supporting links, mount points ...
1
vote
1answer
26 views

Indent execution results in zshell

I'd like to customize my zshell so that the prompt is butted up against the left border like normal. I'd also like to have all execution results indent by perhaps 2 spaces. Is there a way to indent ...
2
votes
2answers
29 views

Is there a man page for PROMPT in zsh?

I know how to look up commands with the man command. When looking at other people's .zshrc files, I see what I think are builtin variables (PROMPT, RPROMPT, etc.). Where might I learn more about ...
1
vote
5answers
83 views

How can I rename/move a file by simply “editing” its path in a shell?

Consider the problem that you want to rename a file called some/path/File With A Long Name.txt into some/path/File with a very long name.txt. To me, this was always one of the few situations, where ...
2
votes
1answer
45 views

In bash 4.3.27 “su” ignores user variables when combining “-” with “-c command”?

Since forever we used to launch user scripts from a different user crontab like this: 00 12 * * 1 su - user2 -c "/home/user2/myscript.sh" By doing this, the script is launched after the interactive ...