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

learn more… | top users | synonyms

0
votes
0answers
4 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 ...
3
votes
1answer
18 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
1answer
21 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
43 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
27 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
19 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
10 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
21 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 ...
0
votes
1answer
17 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
27 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
17 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
17 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
9 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
20 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
0answers
14 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
27 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
22 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
21 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
30 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
44 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
78 views

Linux if elif else fails

I am trying to find if mount point 1 is available if not mount it, if mount point 1 fails, mount 2nd one if that fails dispaly failed message. Here is the code: mount > /tmp/log; if grep -ohw ...
2
votes
1answer
19 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
19 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
33 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 ...
2
votes
1answer
40 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
98 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
4 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
57 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: ...
0
votes
1answer
72 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
42 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
48 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
17 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
17 views

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

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
22 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
50 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
72 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
43 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
13 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 ...
0
votes
2answers
30 views

curl shell command always returns error status 0 - even when fails on input errors

Example: trying to upload a non existing file - curl -d @no-real-file http://google.com | echo $? - returns 0. How can I make curl fail on input errors?
0
votes
0answers
25 views

open a new screen in linux, no access to perl local library

I added my perl local library to my shell startup script (.bashrc) and when I start a terminal in linux: $ echo $PERL5LIB /home/perl5/lib/perl5:/usr/share/vcftools/perl BUT when I open a new ...
0
votes
0answers
17 views

tmux completion (not shell completion)

Is there any way to do completion of arbitrary text from your tmux session (e.g. output from previous commands)? Something similar to hippie-expand in emacs or Any word completion in vim? Note that ...
0
votes
1answer
42 views

input from shell in bash script

i have a bash script i would like modify to support input from shell atm i have to type the link after i have run the script wiak@test:~$ scripts/lget.sh gimme cookie! ...
3
votes
2answers
155 views

Linking multiple files

In bash, say I want to link some but not all files from a directory, e.g., ln -s /dir/file1 /dir/file2 ... /other/dir but the format of the names of the files do not follow some simple rule, so we ...
1
vote
1answer
51 views

Creating a zip file with a timestamp

I have been trying to create a script which compresses a directory with a timestamp and move it to another location on the same server, but I cant seem to get TESTDATE to display on the zip file, ...
2
votes
3answers
91 views

How can I find folders containg x files of a particular type and output those paths on OSX

I have this script for OSX for finding folders that only contain one file, and if that file is an audio file outputting the path of the audio file find "$1" -type d -exec sh -c '[[ $(find "$0" ...
0
votes
2answers
25 views

I want to find out word which ends with ()…Use grep

I want to find out word which ends with ()...Using the grep command in linux. grep file_name_where_i_want_to_search "*()" some thing like that....but its not working
0
votes
0answers
19 views

“Send to Mail Recipient” showing up in the SendTo folder but not on Right Click

Strange issue that's coming up on a user's computer, but I am unable to reproduce on my own computer. In %AppData%\Microsoft\Windows\Sendto, the user has the "Send to Mail Recipient" shortcut. ...
1
vote
1answer
49 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 ...
0
votes
1answer
44 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
2answers
40 views

Shell not expanding *

I am setting up a java classpath in a bash script. I thought that I would have to use quotes to prevent shell from expanding the * based on this question: ...