Questions tagged [shell]

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

Filter by
Sorted by
Tagged with
1 vote
1 answer
60 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 ...
Yingmei Ishere's user avatar
1 vote
1 answer
94 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 3....
Igor Yukhimenko's user avatar
1 vote
1 answer
2k 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 ...
SAN's user avatar
  • 335
1 vote
1 answer
1k 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 ibsim....
Tiana987642's user avatar
1 vote
1 answer
943 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 ...
d33pcode's user avatar
1 vote
1 answer
3k views

echo "something" > file not working when sh script is being executed by remote PHP server

I've got a web-server with my hardcoded webpanel for Source server management and I've got my VPS on CentOS which doesn't really want to execute sh script when asked from remote server. Web-server ...
Josh's user avatar
  • 11
1 vote
3 answers
634 views

Good way to bookmark/navigate relative directory paths?

I work on a linux system with bash 4.x where I frequently find myself navigating different copies of very deep (and large) file directory structures. However, in reality I only need to access a ...
Setjmp's user avatar
  • 357
1 vote
1 answer
88 views

What's the soonest I can send a signal to a background process (trap)?

I have a script from which I run a second script in a subshell. What's the soonest that can send a signal to the second script? script1: ./script2 & kill -SIGCONT $! script2: echo "~~ ENTRY" ...
Pithikos's user avatar
  • 1,604
1 vote
2 answers
3k views

Automaticly run xinit from rc.local as different user

I'm working on some tuning of my raspberry pi b+. So I decided that midori should start automaticly after autologin. With startx it works without problems, but X is still to ressource hungry. So I'll ...
user3048888's user avatar
1 vote
2 answers
428 views

What is the meaning of "var=${str=expr}" in linux shell?

What is the meaning of "var=${str=expr}" in linux shell? Who can explain it for me specifically?
user3872279's user avatar
  • 1,115
1 vote
1 answer
288 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 ...
mateuszk87's user avatar
1 vote
2 answers
379 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 when I read on some web site that we ...
Mohamed KALLEL's user avatar
1 vote
1 answer
101 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 ...
Guest's user avatar
  • 13
1 vote
1 answer
2k views

Get login shell of a user not in /etc/passwd in linux

How do I get the default login shell of a specific user in linux. The user isn't necessarily in /etc/passwd. They may be logging in with NIS or LDAP or other pam method.
fakedrake's user avatar
  • 923
1 vote
1 answer
1k views

BitLocker missing in Windows 8.1 Pro

This is a TPM-free laptop dual booting to Windows 8.1 Pro and Windows 7 Pro. BitLocker was turned on in Windows 8 Pro (before upgrading to 8.1) via group policy. Everything was fine initially, but ...
ȷ̇c's user avatar
  • 172
1 vote
1 answer
971 views

OS X Automator Shell Script for custom search with special character not encoded with utf-8

I find a script here Mac OS X (Lion) Chrome: shortcut for "Search With Google" which shows how to do google search using shell script in OS X Automator. The original script is: open "...
rouraito's user avatar
1 vote
2 answers
2k views

CygWin terminal in remote console (SSH) not starting at correct $HOME path

I have installed CygWin v1.7.28. The problem quickly explained: Basically, when starting a CygWin shell via remote login, the $HOME is not where it should, with all derivated (bad) consequences of ...
Sopalajo de Arrierez's user avatar
1 vote
1 answer
1k views

How to set RTC alarm from script or terminal in OSX?

I have a iMac mini running OSX for powerpc which I want to use for remote backup. The backup will be run via a bash script with rsync over ssh. To save energy the computer is automatically put to ...
Requist's user avatar
  • 930
1 vote
2 answers
15k views

Mac Terminal showing bash instead of my username

This makes it hard to know what directory I am in. I installed a version of python for school and now it says -bash-3.2$ instead of MyMacbook: ~$. I'm sure this is really simple, but I know nothing ...
evan's user avatar
  • 123
1 vote
1 answer
284 views

permission denied in running script

I am running a script but there is an unusual warning: This is what happened in my console #whoami root #ls -l test.sh -rwxr-xr-x. 1 root root 1894 Feb 2 01:58 test.sh #./test.sh -bash: ./test.sh: ...
MLSC's user avatar
  • 175
1 vote
1 answer
466 views

Nested substitution in ZSH

I use zsh. Say, for instance, that I want to remove the current directory from cdpath. That means that I need to remove an element based on content, which fits the ${name:#to_be_removed} pattern ...
PythonNut's user avatar
  • 814
1 vote
2 answers
4k views

How can I replace icons of an application's executable?

I have an application whose executable contains some default icon. Now, I know I can use a shortcut with whatever icon I want, but what I'm looking to do is change the icon without the executable ...
einpoklum's user avatar
  • 9,423
1 vote
1 answer
1k views

How to prefix every command in shell with "sg - grp -c"?

I am using bash shell. I want to run all commands of a specific user to be run as a specific group command in the shell. How can I do it? Can anything be can be done in ~/.bashrc ?
Charan Pai's user avatar
1 vote
1 answer
731 views

How woulld I add $OPTARGs from one arg to an array

So I'm trying to add values from an optarg to an array. I've got: arrays=() while getopts a: args; do case $args in a) arrays+=$OPTARG;; esac done echo $arrays[@] When I run the script, ./...
Harry's user avatar
  • 11
1 vote
1 answer
2k views

Understanding the scope and lifetime of environment variables in shell scripting

I'm pulling my hair out trying to understand shell scripting and passing environment variables, and what not. I'm trying to execute a PHP script from TextWrangler, that in it's turn opens a new PHP ...
Decent Dabbler's user avatar
1 vote
1 answer
205 views

Return control to shell DURING `gvim -f`

I occasionally use gvim -f to start gvim but force the shell to wait for the gvim session to end before resuming execution of whatever it's doing (for instance, I usually edit my bash aliases using an ...
Kyle Strand's user avatar
  • 1,766
1 vote
1 answer
3k views

How do I install GNU's 'make binary package' to android shell

I need make to install things, based on my current knowledge: I have reached a chicken and egg scenario. I have root access to the filesystem and shell, but the native android shell does not come ...
Louie Sanzel's user avatar
1 vote
1 answer
119 views

How to fix.. my watch --interval=60 isn't working properly

Here is the code I use in my CentOS 5 32bit. But after this I see only some of files are zipped and a lot of them isn't included in produced gzip file. nohup watch --interval=60 tar -zcvf /home/C/`...
user263271's user avatar
1 vote
1 answer
98 views

Select set variable value in SSH session

I'm writing a shell script. It will run from machine A, which will SSH into machine B and prompt the user to select a build folder. It'll then copy it to machine A, but I don't know how I can have the ...
xaxisy's user avatar
  • 11
1 vote
1 answer
100 views

History of the name "$PS1"?

Why is the variable containing the shell prompt called PS1 ? Where does it come from ? Does there exist PS2, PS3, etc ... ?
Levans's user avatar
  • 2,170
1 vote
3 answers
568 views

Abbreviation of if statement options in shell

There is some if statement options in shell script. For example -d for directory -f for file. My question is what does stand for -n and -z options? I know how it works. I want to know etymology to ...
ironsand's user avatar
  • 2,299
1 vote
2 answers
704 views

How to change the definition of word separators for the shell?

Is there a way to change the definition of the word separators in bash? This will allow me, for example, to do ctrl+w (delete previous word) at the end of this path: /some/path/of/some/file ...
infokiller's user avatar
1 vote
1 answer
2k views

How to render two columns preserving all whitespace after the first column with awk or alternative?

my output comes in human-readable figures with one space followed by directory names: I am currently using ... awk '{ printf "%-20s %-40s\n", $1, $2 }' input 1G foo 1.5M foo baz 5K foo spaces in ...
Nicolai Fröhlich's user avatar
1 vote
1 answer
219 views

How to determine full command with args given a pid (or port in use)

I've got this nice bash function for telling me the pid using a port: using_port() { lsof -i:${1} } Output looks like this: COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME ...
justingordon's user avatar
  • 1,613
1 vote
1 answer
2k views

starting mongodb from a bash shell script

I am trying to start a mongodb using a cronjob+shell-script combo. In the shell, mongoDB starts when I enter $ mongod, however my executable shell script fails with mongod: command not found. I ...
ricardo's user avatar
  • 209
1 vote
1 answer
908 views

Subtract files from one another recursively between two similar directories

I'm trying to concoct a way to grab two (nearly identical) directories and show me the difference between all files in the two directories. Looking for two different things: 1- List all files (...
Orun's user avatar
  • 145
1 vote
1 answer
2k views

Expect and sudo timeout

I have a main shell script that prompts the user for his password. I then would like to call an expect script while passing the password to it. This expect script will run 3 sudo commands. I know the ...
Codrguy's user avatar
  • 325
1 vote
3 answers
9k views

Create a bootable pen drive through Linux command line

Can I make a bootable pen drive from a ISO using the Linux command line without installing any extra software? If yes, what are the commands?
Udara S.S Liyanage's user avatar
1 vote
1 answer
1k views

Applescript to shell script watch folder

I am trying to setup a watch folder so that when a file is added to a folder, I can run a shell script...for this purpose I made a simple test but cannot make it work... Here is my applescript on ...
Chris James Champeau's user avatar
1 vote
2 answers
585 views

Automatic file encryption/decryption: detect file is closed in Mate/Gnome application

I'm writing a bash script to automatically decrypt file for editing and encrypt it back after file is closed. File type could be any: plain-text, office document, etc. I am on Linux Mint with Mate. I'...
Queeq's user avatar
  • 336
1 vote
1 answer
381 views

How to remove unwanted characters when running command in terminal

I'm using zsh with oh-my-zsh as default shell. When I run a command in guake / gnome-terminal / konsole, a string with format (special-char|command-name|%) appears as the first line of output in ...
phongnh's user avatar
  • 11
1 vote
1 answer
2k views

PDF Shell Extension Handler [duplicate]

Possible Duplicate: How can I view and sort after the page count for multiple PDF files in a Windows file explorer? Is there any Shell Extension Handler for Windows 7 64b, that can show PDF meta-...
Real Dreams's user avatar
  • 4,952
1 vote
1 answer
1k views

/usr/bin/mail equivalant for | sendmail -t

been searching for few hours, and came to no solution. Is there an equal expression for the bash command myfile | sendmail -t where my information needed for sending mails is stored in the "myfile" ...
Yunalescar's user avatar
1 vote
1 answer
946 views

$HOME environment variable edit

I have a question which might sound quite naive but I would like to confirm the behavior of the $HOME environment variable on the MAC OS X. I would like to know if we can append paths to the $HOME ...
user avatar
1 vote
1 answer
271 views

disowning a process before it starts

Is it possible to disown a job at startup w/ out manually pausing the process? Basically the issue is, is that I'm iterating through a number of processes using a python script. I can manually disown ...
ast4's user avatar
  • 123
1 vote
1 answer
308 views

Losing functionality when customizing eshell-prompt-function for emacs

I wanted to suppress the current working directory from the prompt for the eshell like i do on the commandline because it takes up a lot of screen space. Using C-h v i check that the default value is: ...
Palace Chan's user avatar
1 vote
1 answer
559 views

Red Hat shell: less command is always executing .tcshrc

I have a small issue with less command (this is happening only on Red Hat). Any time I use it is executing the .tcshrc. There is no alias defined for less. I have one machine running Red Hat and one ...
alinoz's user avatar
  • 113
1 vote
2 answers
2k views

apt-get works, ping doesn't

I'm using the shell on Ubuntu. $ sudo apt-get install emacs works fine, downloaded the packages and everything. On the other hand : $ ping www.google.com doesn't work : PING www.google.com (74....
Sildar's user avatar
  • 123
1 vote
1 answer
3k views

Adduser before usermod?

This is a quick one that I cant figure out. Does usermod actually create a new user if the user specified doesn't already exist? Here is an example: usermod -s /bin/false $1 If user "tom" doesn'...
J.Zil's user avatar
  • 257
1 vote
1 answer
2k views

How to Download Multiple XML files from different URLs

@slhck provided a useful answer to this similar question. Downloading multiple files with wget and handling parameters This code was provided to read urls from a text file filelist, then run a loop ...
rrrfusco's user avatar
  • 145

1
44 45
46
47 48
82