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
1answer
214 views

error occur when i run awk command write in .sh file and run in cygwin terminal

i have cygwin terminal for run shell script(.sh ) file...it work good..but when i add awk command in shell script and then run Error occur /usr/bin/gawk.exe: error while loading shared libraries: ...
1
vote
1answer
444 views

Ubuntu kill java program started by bash

I've got a problem with killing my Java Program on Ubuntu. I created the following init script: #!/bin/sh ### BEGIN INIT INFO # Provides: control ... # Required-Start: $remote_fs ...
1
vote
1answer
239 views

How to run a shell script on a Mac (10.7.4) to auto install updates?

Im trying to run this shell script that is supposed to do this: This script uses the softwareupdate program on OSX to automatically check for updates and install them. It also logs all updates to ...
1
vote
1answer
3k views

How to turn the laptop built-in webcam on/off from shell

Fn+F6 key combination turns my laptop's integrated web camera on/off. Looking at the dmesg output, it seems that the webcam (USB device) is being more or less virtually connected/disconnected to/from ...
1
vote
1answer
270 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 ...
1
vote
1answer
830 views

how to connect to secured wireless network connection in cmd in windows?

I program on C#, I don't want to use P/invoke, so I will use shell, so I need to connect to a secured wireless network connection on the CMD in windows, I know how to connect to a wireless network but ...
1
vote
1answer
198 views

Pass filename to shell script

On Windows, I can drag and drop a file to a batch file to pass the filename. On Ubuntu 12.10, I can't drag and drop to an .sh file. Opening terminal and running ./sh-file-name.sh file-name.txt ...
1
vote
1answer
587 views

Shell replacement for kiosk environment with desktop icons

I have to deploy around 80 touch-screen terminals for my company. We're going to run several Windows applications on those terminals and they'll be operated by touch input only. I basically want those ...
1
vote
1answer
137 views

Get PS1 evaluated value, or shell prompt value

I am trying to find the command that would return me evaluated value of $PS1 variable or just shell prompt with current path. e.g. foo-user@bar-pc:~\bar I would like to avoid using something like, ...
1
vote
1answer
173 views

Limit CPU usage KSH script

I have a KSH crawler script that crawls filesystems on my network, and i would like to limit it to 25% cpu usage, so it does not impact running systems. I am currently using nice but when i run SED, ...
1
vote
1answer
158 views

bash starts replacing the characters on the current line insead of moving over to the next line

I use bash shell $ bash --version GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu) Copyright (C) 2005 Free Software Foundation, Inc. $ Sometimes, when typing a command on the prompt ...
1
vote
1answer
410 views

Emacs “shell-command-on-region” does not pass STDIN to command if command line contains meta-characters

I'm running Emacs on Windows-XP SP3 GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) of 2008-09-07 on SOFT-MJASON When I run a command where the argument contains shell meta-characters, my Emacs region is ...
0
votes
1answer
8 views

concurrent scheduled jobs and ora-27477

Need: To have Oracle kick off a shell script that performs processing on tables and data in the Oracle database. The script is instantiated by specific activity from web clients. Issue: Web clients ...
0
votes
1answer
26 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 ...
0
votes
1answer
24 views

Writing a secure login script

I'm trying to write a secure login script to allow a user to have limited access to a server and change particular options. My method for doing so is via a python script executed by the users ...
0
votes
1answer
23 views

shellinabox - How can I restrict access to certain users only?

I've got a Ubuntu 14.04 machine which I've set up with shellinabox. Now I would like to restrict access to shellinabox to only a certain user account. Nobody else should be able to log in with it. ...
0
votes
1answer
27 views

compare 2 arrays eg. csv

i would like to know if it is possible to compare 2 list via shell. The setup: List "A" with about 6000 entries List "B" with about 300 entries Is it possible to detect wich are duplicate and wich ...
0
votes
1answer
28 views

Small bootable package to enable ssh client?

I've been trying to find the smallest possible package to put on a cd/thumbdrive that will allow me to use an ssh client on a wired networked computer. I'm talking about really barebones stuff, no ...
0
votes
1answer
33 views

stop all child processes when 1 of then returned exit code 1

I have 2 or more build processes to run in background. I want to stop all the build processes if one of them exit with code other than 0. ./build-1.sh & ./build-2.sh & ./build-3.sh & wait ...
0
votes
1answer
29 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 ...
0
votes
1answer
57 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
1answer
14 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
40 views

Check shell Script copy Status

I have a cron script and i need to adjust it; Actually some clients are generating in a directory some files, my task is to backup that files to a tape, and i need to make a if then else cp $files ...
0
votes
1answer
35 views

get a command process back after closing a session

Arrrgh! I'm using one of those drop down shells (guake, I think) on Linux. I'm dd-ing an SD card, and I accidentilly closed the shell session that was running that command. The light is still ...
0
votes
1answer
56 views

How can I have Emacs window(s) and cygwin shell running simultaneously on Windows?

I have Cygwin working with Emacs 24.3.1 on windows 8.1 with Emacs downloaded from the Cygwin installation, however I can't use Emacs and the Cygwin shell at the same time or open up multiple Emacs ...
0
votes
1answer
94 views

redirecting output in crontab

I have a shell script to monitor table stats and java apps. It works fine when I run manually. But if I put it in the crontab it will get stuck if I don't redirect it's output with export display ...
0
votes
1answer
72 views

Where does Internet Explorer store the last used upload directory?

I have an image of a user's hard drive from which I need to recover some photos, but I don't know the file names or directory they are stored in. The photos are not in any of the typical profile ...
0
votes
1answer
94 views

How do you run a command as another user on Linux?

I have access to a linux server where I can sudo to 'foo' like this without a password: sudo su - foo Once I am the 'foo' user I am able to run a script like this: /dir/foo_user_script.sh The ...
0
votes
1answer
132 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 ...
0
votes
1answer
41 views

shell command to create system v ressource key compatible to ftok system call

I'm working with system V shared memory in an application. during development I need to inspect and, sometimes, delete the memory segment. I know there is the ipcs command to inspect shared memory, ...
0
votes
1answer
13 views

How to enable special carachters in moc?

I am using moc (what is moc) on OSX 10.9 in the zsh. I want to enable special german characters like ä, ü, ö and ß for it. Does someone know how to do that?
0
votes
1answer
36 views

Is it possible to connect to the local Windows shell with PuTTY?

I don't know of a working Windows SSH server (not one that I trust enough, yet, at any rate). Therefore, I can't simply connect to localhost on port 22 from PuTTY. I want to use PuTTY because the ...
0
votes
1answer
153 views

Use the ascii code of a character as an input to sort

I'd like to sort a file with a specific delimiter (ascii 0xff) and the records are zero-terminated. I cannot use the following command though: $ sort -z -t \xff -o data data The error message is: ...
0
votes
1answer
56 views

Terminal scrolling from shell script

Is there any way to perform the effect of using the scroll bar in Terminal.app using a shell command? Maybe something cross-platform, that works in Linux terminal emulators too?
0
votes
1answer
155 views

Is there anything like iTerm2 + Byobu on Windows?

I'm stuck running Windows as my primary OS at work. I'm trying hard to find a good console environment, but falling short. I'd like to have iTerm2 + Byobu. So far I'm using conEmu with the cygwin ...
0
votes
1answer
74 views

How to create my own vpn service on linux shell?

My company has a private linux server, and I'm just a user of this server, my connection to it is via putty or nc. Is there anyway to install a private VPN on it? our server is connected to the ...
0
votes
1answer
29 views

Clearing everything but current line in tmux

I have my Control-K shortcut bound in tmux like this: bind -n C-k send-keys -R \; clear-history \; This clears the scrollback buffer's history as well as the current screen, which is what I want. ...
0
votes
1answer
75 views

shell or perl script to replace the double quotes with their unicodes

I am having two files names as a.html a.xml in a folder and in a.html file i have a tag <div class="snippet abstract"> We present a new "model" for multiple-input-multiple-output ...
0
votes
1answer
96 views

Stopping command from terminal without stopping shell script that started that command

I have a script like this: #!/var/bin/bash tail -f /path/to/file.txt tail -f /path/to/other/file ... ` How can I stop tail -f without stopping whole script? Any idea?
0
votes
1answer
246 views

howto change screen hardstatus dynamically with format, from shell?

howto change screen hardstatus dynamically with format, from shell ? I successfully configured screen using 256 colors and tabs and so on, here is my .screenrc : http://pastebin.com/g8XbMWBH I use ...
0
votes
1answer
212 views

Emacs, Zsh and Ansi-Term — weird chars

My issue is illustrated in the follow images: This is the visual representation I get in my iTerm of my Zsh shell, with the same font as used in Emacs: This my my Emacs output using ansi-term: ...
0
votes
1answer
79 views

How to use arguments with 'find -exec'?

I'm trying to generate static html files for all php scripts inside dir: find . -name "*.php" -exec php {} > {}.html \; But it just dumps all results to {}.html. How to do it properly? And how ...
0
votes
1answer
138 views

How create an account for myself as administrator (sudo)

I have sudoer root access and would like to create one new admin account for myself and one regular account without full access! on the command line I can use $ adduser USERID I tried $ visudo and ...
0
votes
1answer
81 views

rm the current directory you are in and issues surrounding it

If I cd to a directory, is there a quick way to delete the directory I am in and move to the top directory? Usually I cd to a directory, ls it and then cd .. then delete the folder. I want to be able ...
0
votes
1answer
162 views

Invoke zsh, then *source* another file (while entering interactive mode)

This question is of course related, but different to the one about executing a command. That questions’ solutions involve either starting a subshell – which isn’t possible due to the requirement of ...
0
votes
1answer
1k views

Using find with -exec gzip and grep

I have a bunch of zipped up log files and I want to search them all for a string. I tried this but it's not working: find ./ -name "*.log.zip" -exec gzip -dc {} | grep ERROR \; It's giving me: ...
0
votes
1answer
122 views

how to compare negative floating points in bash

We tested our script and it fails on negative floating points comparison in bash. What are we doing wrong ? $F1=10000000000 $F2=300 FLP=$(bc <<< "scale=5; ($F2 - $F1)/$F2 * 100") if [ $FLP ...
0
votes
1answer
270 views

Combining multiple data files with header while also adding a data column

I have multiple tab delimited data files that are separated by month in the format jan06.txt, feb06.txt, ..., dec07.txt. Within each file, it looks something like: Header1 Header2 Header3 ... Data1 ...
0
votes
1answer
124 views

Passing User's aliases to root while doing “sudo su”

Is it possible? I could make an alias to sudo su -;source .bashrc but it seems like source .bashrc is executed in the earlier shell and not in root's sheel (Why?)
0
votes
1answer
71 views

How do I specify the screen-name for a command (Gnu-Screen)?

If there are 2 gnu-screens, with the name: screen1 and screen10. If we want to do something with screen1, I can't, because if I try as example to print something to the screen, it will say that there ...