sh stands for a shell. It is alo often used as extenstion for a shell script.

learn more… | top users | synonyms

1
vote
3answers
244 views

Read everything that has been echo'd and 'errored' to terminal window?

I've inherited a complex shell script running on OSX that gets run on a crontab. Within the script I would like to periodically read everything in the terminal window and write it to another file... ...
0
votes
2answers
681 views

Getting errors trying to run shell script (Linux)

I'm trying to run the following script. I have run it before without issue, but now I encounter an error. #!/bin/bash # init function pause(){ read -p "$*" } echo & echo "(Website):" &&...
0
votes
2answers
110 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 ...
0
votes
2answers
291 views

Copy shell configuration from one machine to another?

I've got login to another server where shell configurations are not like I would want. For example I don't see my username and CWD on prompt, and when I press arrow key, instead of giving last entered ...
2
votes
1answer
1k views

execvp exec format error for shell script on Red Hat Enterprise Linux 6

We have two RHEL 6 systems that are running identical versions of the kernel and glibc (glibc–2.12–1.90.el6_3.6). According to the POSIX standard and the Linux man pages, if the kernel determines that ...
1
vote
1answer
488 views

Why do I sometimes get 'sh: $'\302\211 … ': command not found' in xterm/sh?

Sometimes when I simply type a valid command like 'find ...', or anything really, I get back the following, which is completely unexpected and confusing (... is command name I type): sh: $'\302\211......
1
vote
1answer
2k views

How to force a longer `reboot` in Busybox v1.13.3?

reboot appears to make the root file system read-only almost immediately, causing a race condition with one of my processes which tries to write settings out to a file during its approx 1-2 second ...
1
vote
1answer
562 views

“Undefined variable” error in shell script on Sun Grid Engine

I have the following Sun Grid Engine submission script: #!/bin/sh # sun grid engine cluster # use current working directory #$ -cwd # merge error output into standard output stream #$ -j yes #$ -o ...
0
votes
1answer
9 views

Run Script on OSX Automatically

How can I run a script I made on my mac automatically. It needs to run once a day. Because it requires rsync the mac needs to be connected to the internet and I have realised when it is sleeping wifi ...
0
votes
1answer
16 views

Reset Cache using bash

I'm trying to automate a .sh file to run every time before Chrome opens, here's what I want to do. rm -rf /home/pi/.config/chromium tar -cvf reseterfiles.tgz /home/pi/.config/ The zipped ...
0
votes
1answer
26 views

Duration time between cycles in a log file

My apologies if this is too basic, but I have a log with this kind of information: Mai 5 12:34:00 xoengine XO[1287]: [Xo|xoengineMain.cpp:122|0xb88ec60] starting xoengine 4.0.1.2 (x86) from [/usr/...
0
votes
1answer
63 views

Displaying unicode emoji in filenames on Ubuntu

I'd like to use emoji in filenames and access them on the command line, but I can't seem to get it to work with ls. Weird thing is, if I pipe into just about any other program, the emoji are correctly ...
0
votes
1answer
60 views

Double exit in gzexe

I have seen in gzexe (source) they use the following pattern used in a lot of places all over the file: (exit $res); exit $res What purpose does the exit inside the sub-shell? Doesn't seem to do ...
0
votes
1answer
2k views

unable to execute: Too many levels of symbolic links

By mistake, I executed these commands : sudo ln -sf bash /bin/sh sudo ln -sf bash /bin/bash When I rebooted the Linux server in recovery mode I got this message: init : Failed to spawn friendly-...
0
votes
1answer
28 views

Autostarting a script at boot doesn't recognize the function “function”

I'm trying to get a script containing a function to run just after root autologin on TinyCore 5.3. The script works fine if I launch it from the prompt after login like this ./script.sh But when I add ...
0
votes
1answer
111 views

Memory usage of a process in a shell script

I want to find out the memory usage of a process in a shell script.I tried to use this piece of code : while[process] do if [ -e /proc/$pidno/statm ]; then m=`awk '{OFS="\t";print $1,$2,$3,$6}...
0
votes
1answer
1k views

Issues with this sh script?

Having issues executing this sh script...i don't see anything wrong with it, does someone else see something I screwed up? echo "**************************************" echo "*** ...
0
votes
1answer
76 views

How to make an alias and work in sh for all users (not in bash)?

My question maybe is silly, but how can I make an alias so as to work in sh for all users? I know that I can put an alias, let say this one: alias ls='ls -l' in /etc/bash.bashrc so as to work in ...
0
votes
1answer
665 views

Symbolic links for directories

Really need a quick help on this. This is the scenario. Created source directory SOURCE : /apps/application_scripts/intl/bin Here I have lot of shell scripts (*.sh) TARGET : /home/edwprod/intl/...
0
votes
1answer
657 views

How to configure using arrow key to repeat previous shell commands in Minix

I am new to Minix. I'm so impressed by the speed of the system. It looks elegant, I like it. However, I have a question about the shell. In Linux, while using a shell, up and down arrow keys can be ...
-2
votes
1answer
77 views

Bash executing command

Can anyone please give me the list generated by this : -{ for i in {1..100}; do lynx -dump -nonumbers -listonly [http]://www.dailymotion.com/user/MTDCafe/$i [http]://www.dailymotion.com/visited/user/...
3
votes
0answers
45 views

Redirecting display linux

from a sh shell, I am running a script calling a Software that requires opening a Gui. It ends up with a flashing window each time the call is run. I tried to unset the DISPLAY environment variable ...
1
vote
0answers
772 views

execl: couldn't exec `/bin/sh'

I accidentally moved the whole bin, boot, dev and etc directory. After moving everything back I get the following error email from various cron jobs: execl: couldn't exec `/bin/sh' execl: No such ...
1
vote
0answers
827 views

using screen with start-stop-daemon, sysv

I'm trying to run a program with an ncurse interface as a daemon using screen. I want to use start-stop-daemon to manage the process, but I'm having trouble creating a SysV init script. Variables: ...
0
votes
0answers
25 views

Startup script unexpected results

I'm experimenting with a small script to setup my webserver on Vultr. This is a "Startup script" that is used by Vultr on the background after deploying a new machine for me. If I run manually with ...
0
votes
0answers
70 views

sh command not found on Windows 10

I'm trying to install devkit using the command npm install -g devkit. It makes a loading bar which goes on for a few minutes then gives an error, firstly saying that the sh command can't be found, ...
0
votes
0answers
14 views

How to make ConEmu execute .sh in the same window with Git for Windows?

I'm using ConEmu on Windows with Git for Windows installed. When I try to execute an .sh script, the software starts an instance of Windows' default console and executes the script there. How can I ...
0
votes
0answers
10 views

XWorking with .sh Files in XTerm

.I am trying to install my VPN software on my Lubuntu 15.10 and I am using Xterm to follow through a few commands. First I run wget https://www.privateinternetaccess.com/installer/install_ubuntu.sh ...
0
votes
0answers
34 views

bash “vi mode” search command line (not history buffer)

When working in bash - if I am in "vi" mode, I can use ? or / to "search". However, this appears to search the history buffer. If I am working with a (very) long command line, I would like to be able ...
0
votes
0answers
22 views

pgpass does not execute

So i have a backup1.sh script in /home/user/ #!/bin/sh tar -czf /home/ruud/backup1.tgz /usr/lib/python2.7/dist-packages/openerp pg_dump -U dbadmin -h 127.0.0.1 123telcom -f /home/ruud/dbbackup.sql ...
0
votes
0answers
22 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
0answers
292 views

bash script rm cannot delete folder created by php mkdir

I cannot delete folder created by php mkdir for I in `echo $*` do find $I -type f -name "sess_*" -exec rm -f {} \; find $I -type f -name "*.bak" -exec rm -f {} \; find $I -type f -name "...