Tagged Questions
36
votes
12answers
12k 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 ...
7
votes
3answers
254 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 ...
6
votes
4answers
1k 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 ...
5
votes
6answers
297 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?
3
votes
3answers
66 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
148 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 ...
3
votes
2answers
169 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 ...
2
votes
3answers
255 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 ...
2
votes
3answers
555 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=ztemp.xml |cut -f1 -d '.'
I get the error:
ztemp.xml is not a command
The value of var4 never gets ...
1
vote
1answer
37 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 ...