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
0answers
38 views

shell script for finding the unix noun phrase

one entry in the on database is: LPE-1*story#1/1 of pearl#1/2*historia de la perla*storia della perla* histoire de la perle* história da pérola*istoria perlei*TOPIC The fields are separated by ...
0
votes
0answers
111 views

What ever happened to BBLean (Black Box Windows Shell?)

So I just found out about people created alternative Window shells. I found this out by finding out about Black Box or bblean. My question is, whatever happened to these nifty shells? This beats ...
0
votes
3answers
116 views

Shell is interpreting IFS=$'\n' as IFS='n'

I am using a Bash shell on a Ubuntu 12.04 LTS server, and it seems that IFS=$'\n' is being treated as IFS='n'. Script in use: concat=$(echo -n "concat:" && find ...
1
vote
1answer
460 views

Adding a month to an input date in unix

I need to write a script that asks user for an input date. Then I need to add a month to that date or at least 30 days. Example: Date: 2009-05-12 I need to get 2009-06-12 this code is not working: ...
1
vote
1answer
62 views

Linux who --process option

I was playing around with who when I noticed that the who -p option does not give any output. Running the command as root also didn't change the output. I tried this on a CentOS, Ubuntu 12.04 and ...
0
votes
0answers
26 views

Remote URL Completion in Bash

I'm currently adding support for remote url completion for svn in Bash. I'm currently using a modified bash-completion-svn that figures out when to trigger the completion on URls looking like ...
0
votes
1answer
114 views

Ping test for 4 hours

I am trying to perform a ping a test to the servers for 4 hours I tried using ping -t '14400' IP-ADDRESS but i am getting a following error: "ping: ttl 14400 out of range" Is there any other ...
0
votes
1answer
66 views

Terminal auto-complete with @ symbol?

I have multiple directories that include the @ symbol within the directory name. When I do the normal tab to auto-complete a directory name it chokes if there is an @ symbol included in the name; ...
1
vote
2answers
57 views

ffmpeg resulting bitrate higher than expected. did i miss something?

i am using ffmpeg to create some h264 transport streams. the bitrate for video is 496k, for audio 64k. However when the ( 2-pass ) encoding is done, i get a stream with more then 600k. i am using the ...
1
vote
0answers
64 views

Record the sound of a program to the microphone

I want to record the sound of a program and to direct it as an microphone entry on linux. For instance, I'm listening a music on youtube, and I want that music to be send to my skype's conversation ...
1
vote
2answers
57 views

How to save linux command?

I am using grep -r [^a-zA-Z0-9]myVariableName[^a-zA-Z0-9] -n JS_files/ as mygrep file grep -r [^a-zA-Z0-9]$1[^a-zA-Z0-9] -n JS_files/ and then sh mygrep myVariableName But then I lose the ...
3
votes
1answer
144 views

How can I delete a just-typed newline character in bash?

I sometimes copy-paste paths into the terminal, and often accidentally copy the newline character. For example, I want to find then read the contents of foobar.txt. $ locate foobar.txt ...
2
votes
1answer
102 views

Is it safe to delete empty directories recursively on Linux?

Using the find command, it is easy to recursively delete all empty directories. Which empty directories are safe to delete, and which ones are not?
0
votes
1answer
96 views

How to prevent users from renaming files while providing write permissions on Linux

For some special purpose, I want to prevent non-root users of the Linux Server from changing the filenames. However, they can modify and write to the contents of the file. How to do this from command ...
2
votes
2answers
305 views

Cannot delete hidden file on network drive using DOS / batch script

I am trying to delete a file from a mapped network drive, I: In my batch script, I have: del /f I:\bin\.hiddenfile When I run the script, I go to the directory I:\bin and see that .hiddenfile is ...
2
votes
0answers
61 views

How can I get emacs 24.* under windows to autocomplete paths in shell buffers using “\” instead of “/”?

See How can I get emacs under windows to autocomplete paths in shell buffers using "\" instead of "/"? I use emacs on windows 7, when calling M-x shell, emacs opens a DOS-Shell. ...
0
votes
2answers
72 views

Instructions embedded in Bash script?

Is there a way to make a bash script require a set of parameters when it's loaded, and if not, it will automatically spit out an echo to the screen giving instructions? Looking at this example of a ...
0
votes
1answer
73 views

bash tab completion is showing commands instead of files and folders

I used chmod to make some scripts executable, and now my bash shell is tab-autocompleting all available commands. How can I make it go back to completing just files / folders in the current folder?
0
votes
2answers
846 views

Exit sudo in the middle of a shell script

I have a shell script in which most of the commands need to be run under sudo; however, the last few commands need to be run as the current user. Is there a way I can exit sudo and switch to the ...
2
votes
0answers
57 views

How to get a shell prompt in NX?

I have installed nxserver on a ubuntu machine and am able to connect to this machine via the free NX client on a windows machine. Things seem to be working fine except that the xterm has a weird NX ...
1
vote
1answer
37 views

What's the difference between 'chsh -s' and 'export SHELL'?

I think that the export command is only active per login session, but I'm not sure. chsh I think is more permanent. Can someone clear this up for me (preferably with links/docs)? Thanks.
0
votes
0answers
916 views

How do I fix an “Invalid license data. Reinstall is required.” error in Visual Shell Express (Isolated) 2010?

So I have recently instealled Visual Shell Express (Isolated) 2010 in Windows 7. The problem is, every time I open it, it says, Invalid License Data. Reinstall Required. I saw this: How do I fix an ...
1
vote
1answer
122 views

Auditd - auditctl rule to monitor dir only (not all sub dir and files etc..)

I am trying to use auditd to monitor changes to a directory. The problem is that when I setup a rule it does monitor the dir I specified but also all the sub dir and files making the monitor useless ...
3
votes
2answers
181 views

Is setting a mail user's shell to /usr/bin/passwd in the /etc/passwd file a safe way to allow them to change their own password by simply ssh'ing?

I have a machine which is used mostly as a mail server: $ uname -a Linux myhost.com 2.6.32-279.19.1.el6.x86_64 #1 SMP Wed Dec 19 07:05:20 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux and I would ...
1
vote
1answer
21 views

Register a file specified by open

So I have this small bundle with applescript made, and it even seems to work as it should. However, it appearently doesnt open my files when it is asked to via the open utility. It works though when I ...
0
votes
0answers
120 views

OSX Automator App (chrome kiosk/app)

I'm launching chrome, using a shell script in an app window. I use Automator to run this shell script, and create a .app bundle with the result. When it launches it creates a separate chrome window ...
0
votes
1answer
69 views

How do you determine if you're on a linux or BSD system inside a script?

I've got a rather extensive selection of dotfiles thats been kept in a git repo for the longest time - I just maintain a separate branch of code for bsd-isms (for instance, on Linux, to get colored ls ...
0
votes
1answer
81 views

Can't remove a directory

I'm trying this: rm -fr /app/foo But getting error message: rm: cannot remove `/app/foo': Is a directory What I'm doing wrong?
0
votes
2answers
73 views

Syntax Error 'Cat' Unexpected

I wrote this script for copying XML files I received to a spot on my sdcard. However when I run it in terminal i get the following. Can someone explain if i did something wrong or whats going on? cd ...
2
votes
1answer
126 views

How to get a bash prompt in a ssh tunnel with rsa keys?

After setting client and server with the public keys and allowing PubKeyAuthentication yes, I issue the following command and get a shell that waits indefinitely. mad@amd:~> ssh -T ...
4
votes
3answers
2k views

Is there a way to edit files inside of a zip file without explicitly extracting them first?

I sometimes need to make changes to a .zip or .jar file, so I usually move the file to /tmp, extract all the files with unzip, edit a few files, and then re-zip up the files. This works, but it can ...
1
vote
0answers
117 views

Mac: Run screen command from launchctl

I have a Python script that I would like to run on a Mac at system start up in a detached screen session. The Python File (foo.py): import time import datetime while True: print 'hello', ...
3
votes
2answers
137 views

restrict rsync (or bash script) to a directory

After a bad accident with rsync deleting wrong files due to wrong destination parameter, I want to restrict rsync (or the bash script running it) to be able to delete/modify files only under a certain ...
1
vote
1answer
216 views

FreeBSD csh style history auto completion in bash

I am looking for a way to make it so that my ubuntu bash shell has the same kind of history completion as you get with csh in FreeBSD. The behavior is that on the command line if i start to type ...
3
votes
2answers
211 views

Xterm control sequence to get RGB value for ANSI color

The meat In (some) terminals you can use a sequence like this; printf "\e]4;3;rgb:cc/78/33\e\\" to set the third color in the ANSI color palette to the RGB values represented by #CC7833. Can you ...
0
votes
1answer
58 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
0answers
150 views

sshd : locale not set with `UsePam no`

I even did reinstallation for this thinking something was wrong, and here's what I've found. #usepam=no Using username "sysadmin". Authenticating with public key "rsa-key-20130918" sysadmin@ubuntu:~$ ...
1
vote
2answers
94 views

Stdout and stderror in CentOS

I am exec command: yum info mcrypt | grep -i error > /dev/null yum info mcrypt | grep -i error 2> /dev/null But i see: Error: No matching Packages to list How I can hide this messasge ...
2
votes
1answer
143 views

Using the same file as stdin and stdout results in empty file

If want to filter a file but if I use the same file as input and output the output file is empty. Is there another solution instead of using a second file? php -r "echo preg_replace('~/\* DEV ...
4
votes
2answers
180 views

Linux command line / Move files filtered by lexicographic order

I have some files in a directory that are named IMG_0001.jpg ... IMG_9999.jpg. I want to move to another directory the files that lexicographically have a name greater than IMG_9431.jpg How can I do ...
0
votes
0answers
16 views

How do you close MacShellBundle in an application that is in the trash?

I am trying to permanently delete Zumo Drive from my computer, which is running OSX 10.6.8. I have removed ZumoDrive.app from the Applications folder and moved it to the trash. When I attempt to ...
0
votes
0answers
42 views

Mac command to copy gateway from VPN and apply to Ethernet

I found some commands (below) for automatically forwarding the VPN on my mac to my ethernet adaptor. This works just fine, however, sometimes when the gateway changes on the VPN connection, I need to ...
1
vote
2answers
49 views

Forked Processes and Shared variables

I have a bash script with two forked functions all writing to a log. When both have finished, I'd like to delete this log. The problem I'm having though, is that processFinishCount is never greater ...
1
vote
0answers
120 views

“Script” command in Bash on Mac OSX

quick question regarding the "script" command in Bash on a Mac OSX 10.8.4 system. In any other bash environment on Fedora, CentOS, etc; when I use the script command it just begins recording with no ...
4
votes
2answers
542 views

How to launch the Windows Explorer shell after starting with a different one?

The following is a hack, but for what I need it for its fine... I created a C# program that shows some EULA text and has an Agree and Disagree button. I set the ...
2
votes
0answers
266 views

loop curl could not resolve host

I've had working script, which suddenly doesn't works. It contains something like this: while read url; do curl $url done < links links file: http://duckduckgo.com http://google.com And I ...
2
votes
1answer
72 views

Setting the $SHELL environment variable

For some reason, when I run chsh -s /bin/zsh, my $SHELL environment variable isn't getting set. When I run: echo $SHELL It outputs: /bin/bash
1
vote
0answers
230 views

Sending number over serial to arduino sending something different?

I have an arduino setup that turns on a light when it receives a 1, and turns off a light when it receives a 0. I don't think there is anything wrong with the code. I can send the Arduino a 1 with ...
2
votes
2answers
942 views

View all files in a website's directory?

Is it possible to list all files and directories in a given website directory from the Linux shell? Something similar to: ls -l some_directory but instead of some_directory, it would be ls -l ...
1
vote
1answer
44 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 ...