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
votes
1answer
54 views

Copy one directory to another while retaining its structure

Let's assume I have the following source directory: source/ subdir1/file1 subdir1/file2 subdir2/file3 subdir3/file4 And target directory: target subdir1/file5 subdir2/file6 ...
0
votes
2answers
108 views

How to continue running a program in bash

I have made a bash program in Ubuntu. The program is "rock, scissors paper with computer". I want to continue this program until the message "you win, bye bye". Could anyone suggest a method for me ...
1
vote
1answer
158 views

sudo command with equal sign (=) gets confused for environment variable

I'm trying to run various commands through sudo, where the equal sign (=) is a part of the command. Under certain cases, it seems that sudo confuses that sign for setting and environment variable. I ...
0
votes
0answers
81 views

Specific command not recognized in only one shell

I'm running Windows7 as OS as my development machine. It has various Shells: cmd Powershell Mysysgit GNU Bash <-- this is the one not working PuppetLabs Shell Nodejs Shell PHPStorm built in ...
-1
votes
1answer
2k views

Shell files (*.sh) to batch file (*.bat) converter?

It's quiet tedious to convert shell scripts into batch files. Is there a way to automatically and easily perform .sh to .bat conversion or vice versa?
0
votes
1answer
89 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 ...
1
vote
2answers
41 views

Is there a terminal supporting embeded graph under linux? [closed]

everyone. I want to know if there is a graphic terminal which support viewing images inline. The ipython qtconsole is very cool because it has the '%matplotlib inline' magic. But I'd like to use ...
0
votes
1answer
165 views

how to change directory in ubuntu

I'm trying to change the directories of a symbolic link. ln -s /usr/local/mysql-cluster-gpl-7.1.5-linux-i686-glibc23 /usr/local/mysql When I type command cd /usr/local/mysql it is giving me error ...
1
vote
3answers
271 views

Is it possible to TFTP files via shell script in OS X?

I'm working on migrating my development environment from Windows to OS X and have run across a problem with TFTP. I use TFTP to upload files to an embedded network device, this is the only option to ...
0
votes
1answer
38 views

Sed is not Interpreting Pipes Correctly

OK, this is hard to explain, so I will give a reproducible example: I have a text file test.txt contains the line: somesetting-parameter /an/old/path I want to replace it with a path I can get via ...
1
vote
1answer
124 views

Color in bash prompt messes up git output

I changed my .bashrc to include export PS1="\033[1;33m\u@\h: \w>\033[0m" so that my shell prompt would be colored, but it seems the \033 messes up git output (log and diff, at least). I see ...
0
votes
1answer
196 views

Choosing shell for xterm in Cygwin

Basically my question is closely related to this one: http://stackoverflow.com/questions/21905380/how-do-i-get-cygwin-xterm-to-use-bash-and-not-sh I also want to set bash as the default shell for ...
0
votes
0answers
11 views

Output of usbmon ( length field )?

In http://www.mjmwired.net/kernel/Documentation/usb/usbmon.txt#163 it is written that before status tag ,there is data length field ,in my output for usbmon http://pastebin.com/b6U7Je7h please ...
4
votes
2answers
602 views

How to use usbmon for knowing amount of data transferred from usb (pendrive )?

Please someone explain me in simple terms how to use usbmon to track the amount of data transferred from pendrive ?
-2
votes
2answers
85 views

Trying to count and print song file names using awk

RANK NAME BAND YEAR GENERE DOMESTIC/INTERNATIONAL 206:Reach Out, I'll Be There:The Four Tops:1978:Pop:3/2 207:Bye Bye Love:The Everly Brothers:1950:Classic:3/2 ...
2
votes
1answer
545 views

A List Of Windows Shell Commands [duplicate]

I would love a list of Shell commands for Windows. Not to be confused with commands that you would run in Windows DOS. Over time I have come across these commands here and there. Like for example if ...
0
votes
1answer
205 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
2answers
33 views

CLI tool to graphically select lines during piped commands

Is there a tool similar to choose that I can plug into chain of commands that will let me select (multiple) lines for the next step? choose unfortunately doesn't "pass on" the line you select, ...
0
votes
1answer
39 views

alias can't find a file that actually exists

On my personnal computer, not a server, in my .bash_profile (I'm on OSX) — sym-linked to .bashrc, I have the following line among some others : alias deploy=sh ~/dir/ectory/deploy.sh The file ...
1
vote
2answers
438 views

How to stop shell script if curl failed

I have script that used curl when i pass wrong parameters to script curl failed but script continue executing. I have tried use curl -f/--fail parameter but problem does not solved. What is the best ...
1
vote
1answer
65 views

What is the ZSH equivalent of 'expr'?

The expr utility evaluates an expression and writes the result on standard output. What is the canonical ZSH way to evaluate an expression, and print the result? Solution: I believe the answer is ...
0
votes
0answers
108 views

Unable to run tmux on OS X

So I got brew on my mac and I had tmux installed and running just fine. Then after I refreshed my system every time I try to run tmux i get this error: "-bash: tmux: command not found" So since I'm ...
0
votes
1answer
171 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 ...
1
vote
1answer
27 views

Background chained ssh tunnel dropped instantly

I'm trying to establish the following chained ssh tunnel: ssh -A -t gatewayuser@gatewayserver 'ssh -N -A -t -R 55520:127.0.0.1:55520 user@dbserver' & This is part of a shell script, I want the ...
0
votes
0answers
32 views

Why does CygWin shell uses TAB completion for .DLL files?

If I type in a CygWin Bash shell forma TAB, the result expands to format.com. But if I type modeTABTAB, the results expands to: $ mode mode.com modemui.dll As long as .DLL files are not ...
0
votes
1answer
151 views

Using find and wc -L to find files containing lines longer then 500 characters

I have this command: find . -name "*.php" -exec wc -L '{}' \; And I believe it gives me the count of the longest line for each file. But I'm looking for a way to only print out the count and file ...
0
votes
1answer
55 views

Kill display manager and start another one with a script

I have a small script in which I kill gdm3 and start up an X Session. It works, but I have to run it 3 times. export DISPLAY=:0 var = $(pidof gdm3) kill $(var) X :0 & xterm & export ...
0
votes
1answer
44 views

How to print process id into statment

I have assigned a work to take take all process and make them into a statement. So I tried this script. #!/bin/bash a= ps | awk '{print $1}' echo select $a So I am getting this output PID 1838 ...
1
vote
1answer
59 views

How do I identify shell script execution vs dot execution

I'm writing a bash script that needs to run on the current process for it to be useful. That is, I want to make sure that the script was invoked with source script.sh or . ./script.sh and not ...
1
vote
1answer
112 views

writing more complex math input to fish shell

The fish documentation explains that the math command is essentially a thin wrapper to bc. The bc documentation has further info about more complex ops: If bc is invoked with the -l option, a math ...
1
vote
0answers
61 views

Terminal's bin/bash not responding

I have Googled through several instances of this issue but cannot get Terminal to open up with bash. I restarted the program, the computer and even logged in through another Administrator account but ...
0
votes
3answers
499 views

How can I add a program path to the Windows environment variables for easy command line access?

Let's say I want to add the following path to the Windows environment variables: C:\Program Files (x86)\VideoLAN\VLC\vlc.exe Such that I can simply type the following from a command line without using ...
1
vote
3answers
135 views

Linux if elif else fails

I am trying to find if mount point 1 is available and if not mount it. If mount point 1 fails, mount 2nd one. If that fails then display a failure message. Here is the code: mount > /tmp/log; ...
2
votes
1answer
63 views

Are there limits to file length piped from find to xargs or using find -exec +

In question [ Find and delete all the directories named "test" in linux ] on this site, the best answer talks about using these two commands: find . -name test -type d -print0|xargs -0 rm ...
0
votes
1answer
56 views

find files older than create its parent folder in a directory and move them there

I've been trying to create a bash script that does the following. Use the find command to search for files older than 7 days (find . -type f -mtime +7 ! -iname '.*', take the parent directory(of the ...
0
votes
1answer
146 views

Shell script truncated when run from cron or at

I'm seeing some very strange behavior on a Linux based NAS (DNS-323) I have. I'm using a simple shell script to back up the files on the NAS to another box. After making some recent additions, the ...
3
votes
2answers
472 views

What's the ZSH equivalent of BASH's $PROMPT_COMMAND?

BASH supports a $PROMPT_COMMAND environment variable that defines a command to be executed before any first-level interactive prompt. I'm looking for a ZSH equilvalent of that. The documentation says ...
1
vote
1answer
140 views

Switch back to VIM before shell command finishes

When executing a shell command in VIM, it waits for the command to finish. You can press Enter to switch back to VIM, but it will only switch back after the command has finished. In the event of a ...
0
votes
0answers
14 views

How to Sent a Parameter to A Specific Jar From the Context Menu in Explorer?

I have a jar file at this path C:\mgnfcnt.jar . I added an option to right click to fire this jar when user clicked this option. And also I want to send the path of file whick right clicked to this ...
0
votes
1answer
195 views

How to rename a file with the current date from the context menu in Explorer?

I want to be able to rename any file or folder with the current date, so I added the following key value to the registry, to get this option to show up in the right-click context menu: ...
1
vote
1answer
742 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 ...
1
vote
4answers
124 views

Skip parameter in Linux bash

I need to write a shell-script which handles 3 parameters ($1 $2 and $3). Within the bash I have to skip parameter 2 (I'm actually writing something like ./script.sh para1 para3). The script is OK. ...
1
vote
2answers
92 views

Can I use shell: commands to change directory in CMD?

I am trying to create a batch file which installs favorites on all company PCs and Notebooks. Is it possible to change the directory in CMD using shell:favorites? I need this because on the ...
0
votes
0answers
48 views

Vagrantfile - is rvm in ~/.rvm/scripts/rvm or ~/.rvm/bin/rvm?

I'm still learning my way around some of the more hidden files in terminal and I was trying to setup a Vagrant box with rails via shell script provisioning, with some help from these links: ...
0
votes
1answer
25 views

Should I put local/custom directories first or last on my path? [closed]

If I (a regular user) have, for example a ~/bin, with executables in it, should that go first or last on my PATH? why? Is there a standard/conventional approach under Linux? This question ...
0
votes
1answer
55 views

How to unzip the Portuguese file

I have a zip file containing data in Portuguese. When I try to unzip the file $ unzip abc.zip It creates a file "abc.csv" but when I try to look into data, I get "?" instead of characters like ...
3
votes
1answer
728 views

#!/bin/bash -e :: what is `-e`? other arguments?

I am a shell script coder that always opt to use shell as top level as part of my belt in creating website apps on the fly and have relied on my bash scripts if I want a project to be implemented ...
0
votes
1answer
406 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 ...
2
votes
1answer
1k views

Is there a way around broken pipe?

I have a directory with a large number of files. ./I_am_a_dir_with_many_subdirs/ Within a script I'd like to find all subdirs in it, to sort them and to output to a bash array. So, I do: ...
0
votes
0answers
17 views

(MAC) Change location of shell script's shell

When I make an executable shell script ("http://chimpy.wordpress.com/2010/08/29/mac-os-x-shortcut-link-to-python-script/", but without the python part), It's pointer location (The location commands ...