20
votes
2answers
534 views

How do I move all files output from a command?

I have this grep command to find files without the word Attachments in them. grep -L -- Attachments * I want to move all the files that are output from that command. How do I do that in bash? Do I ...
2
votes
3answers
29 views

setting up script in a linux machine for scientific computation [closed]

I'd like to setup machine for test some computation in my old laptop, before replicate the tests on the server. The computation will be image-processing and machine learning, run some program, load ...
0
votes
0answers
48 views

Video tools for creating presentation

I have captured video (with audio) from presentation, slides (just images), and array of times (when slides was listed). Goal is to create presentation video: big slide with small video frame at the ...
0
votes
3answers
104 views

How to compact a chmod UNIX command

Is there anyway to compact the follow UNIX command: chmod 755 scriptA.ksh | chmod 755 scriptB.ksh | chmod 755 scriptC.ksh | chmod 755 scriptD.ksh The above command makes every KornShell (ksh) ...
1
vote
4answers
144 views

Is there a difference between ./script and bash script?

Given a shell script file that begins as #!/bin/bash # (bash script here), and has been chmod +xed, is there any difference in running ./script and bash script from the command-line?
1
vote
2answers
248 views

Need to copy files to existing directory and remove files already there with the same name but different extension

EDIT: Total rewrite of question for clarity. I have a directory tree (new) with a bunch of files of with an extension of .new. I have an identical tree (old) where many of the files have names ...
4
votes
1answer
54 views

How can I get information about my virtual desktops via the command line?

I'm curious how I can get information such as the dimensions of my desktop, which desktop is currently active, and what labels (if any) are set for my desktop enviornment (DE).
3
votes
2answers
280 views

How to get volume level from the command line?

I have a text status bar on a tiling window manager and I am using tcl to feed information to it. At the moment I need a command line that output the volume level 0% to 100%. I am using Arch Linux.
4
votes
2answers
224 views

Is there a way to simulate a “Close” event on various windows using the terminal?

I answered on Ask Ubuntu Quit all instances of gnome-terminal via a command but as you all can read gnome-terminal didn't seems to have a SIGcall I could use to simulate this "Close" event. So this ...
0
votes
1answer
108 views

how to list all the internet's IP ranges? [closed]

I was wondering if I list all the IP ranges directly available on the internet. perhaps also group them by country and ISP? I know that a lot of people do research nowadays on datamining and ...
0
votes
1answer
76 views

How can I use a variable from a script?

A bash script is running as I defined it in Startup Applications. It is possible to display on terminal a variable used in that script? If yes, how?
3
votes
2answers
333 views

How can I determine if HTML5 player is running in browser?

I would like to find a command-line or a script that will show me if HTML5 player is running or not in a browser (firefox or chromium). For example, to determine if Flash player is running in a ...
5
votes
3answers
656 views

How to constraint time a program runs in Linux?

I have several simulations to do, each is invoked with python simulate.py <parameter list>. The problem with these simulations is that some of them hang without quiting, which prevents me from ...
1
vote
0answers
79 views

rsstail Not Printing Output

I've installed rsstail 1.8 on my linux box and everything seems to be going smoothly, knock on wood, except for the part where rsstail isn't printing the streams. Running the command, I see that it's ...
2
votes
2answers
406 views

Averaging output of dstat

I need to average upload and download speed using dstat -n. How can I add all the received and sent data sizes that appear after dstat -n, so that I can add them and find average upload and download ...
1
vote
3answers
164 views

Rerunning the same command with a different parameter

I know that I can run the following command ls Some{File,Folder} And it is equivalent to running this: ls SomeFile SomeFolder (I also use it a lot for things like mv place_{a,b}) However, I was ...
2
votes
2answers
717 views

Concatenate multiple files under subdirectories

My directory structure is given below x:\Project_2012-158A\Sample_4041 SampleSheet.csv 4041_CGTACG_L002_R1_001.fastq 4041_CGTACG_L002_R2_001.fastq 4041_CGTACG_L006_R2_001.fastq ...
1
vote
4answers
816 views

Checking if a file exists in several directories

I've been working on this far too long and need some help. I need a script that will look at files in a directory and see if it exists in one of several directories. I need something like this: for ...
2
votes
0answers
146 views

How to emulate a KWin effect by command line?

I would like to apply the Toogle Invert Effect when I start my system. So, I need to know how to call this KWin effect using the terminal. OBS.: I'd tried xte "keydown Meta_L" "key i" "keyup ...
2
votes
2answers
532 views

What would it take to add a command to run a script at the completion any given random task?

I was playing around with Pushover, and had the thought that it would be cool if I could use it as an argument on any random command, so that it would run a pushover script at the end of the task, ...
5
votes
2answers
862 views

How to tweet using terminal?

I would like to tweet a message using terminal. I tried something like: curl -u 'TwitterUsername':'TwitterPassword' -d status=”Your Message Here” https://twitter.com/statuses/update.xml but seems ...
1
vote
1answer
696 views

How to open a local URL (webpage) on the command line

On MacOS X I can run open /some/path/index.html and this would open the page index.html with the default software that handles .html files. Is there something similar on Ubuntu Linux? I have used ...
3
votes
3answers
731 views

command line audio with mpg123 - how to save position in audio and begin from that location next time?

I am contemplating using mpg123 as an audiobook player. I can't find any other good audiobook players for Linux, and I think mpg123 may be my best option. My audiobooks are organized by directories ...
3
votes
1answer
385 views

How can I copy all users .bash_history files into my home directory?

I am running as root. I want to copy all the users on the system's .bash_history files into my home directory. I can do this to combine all of them into one, but then I can't tell who's commands are ...
9
votes
3answers
597 views

How to pipe the list of commands displayed by of “tab complete”?

When using commands in bash I like the double tab option to display the available commands. Some commands have more possible matches than others: Is there a way I can pipe the output of the double ...
3
votes
3answers
3k views

How to watch rss feed for new entries from bash script?

I need to watch a RSS feed from our hudson ci server. Each time a new entry is available i want to play a sound by calling #>play sound.wav. Does anyone know a tool which can watch a rss-feed and ...
5
votes
3answers
4k views

Storing output of command in shell variable

I have an operation using cut that I would like to assign result to a variable var4=echo ztemp.xml |cut -f1 -d '.' I get the error: ztemp.xml is not a command The value of var4 never gets ...
4
votes
2answers
302 views

Scheduling command/script by specifying the exact second

I'm using bash and wondering how I can execute a command/script at a later specified time, with the accuracy of a second? I read the man page for the at-command, but as far as I could understand it's ...
8
votes
4answers
6k views

grep — removing text after delimiter token

I have a file in which I need to eliminate everything after the first ; on every line. So a file like this: sdfsdsdf; fsdfsddf;sdfsd; Will result in this: sdfsdsdf fsdfsddf I have looked into ...
8
votes
6answers
640 views

Best way run a command on each file in a directory tree

There appear be a number of ways to do this including loops in shell script, find and xargs. Which of these is best, and which is most portable?
140
votes
22answers
66k views

Repeat a Unix command every x seconds forever

There's a builtin Unix command repeat whose first argument is the number of times to repeat a command, where the command (with any arguments) is specified by the remaining arguments to repeat. For ...