Tagged Questions
A script is a sequence of commands or instructions that are interpreted by another program rather than compiled into a stand alone program.
1
vote
3answers
61 views
Evalute passed in variable in bash
Is there a way to pass in a variable as an argument to a bash script and have it evaluated scoped by the bash script?
Given:
# cat /path/to/file/of/host/names
bob
tom
joe
etc...
# dofor
FILE=$1
...
2
votes
3answers
43 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 ...
3
votes
3answers
76 views
Last failed command in bash
The $? variable holds the exit status of last run command. Is there a variable that holds last run command itself?
1
vote
3answers
69 views
tail -f equivalent
I am seeing several seconds delay with the tail command. I found the cause for it has something to do with nfs services. I am using arch linux and yet to find out how to disable all these services
I ...
6
votes
2answers
138 views
bash: Piping for loop output prevents local variable modification
First off, sorry for the title. I'm not sure of the correct terminology so if anyone can improve upon it that would be good.
I am trying to write a simple bash function that takes, as it's arguments, ...
5
votes
4answers
123 views
Shell programming, avoiding tempfiles
I often write KSH shell scripts that follow the same pattern:
(1) retrieve output from one or more command
(2) format it using grep|cut|awk|sed and print it to the screen or to a file
In order to ...
4
votes
1answer
44 views
Alternatives to XDialog
Are there any alternatives to XDialog?
Ideally something that would support both X server and terminal interface.
1
vote
2answers
58 views
How can I queue processes?
I have a surveillance camera and a program records videos when motion is detected. Basically, this program saves the video in a very heavy format.
My solution was to call a script that converts the ...
3
votes
1answer
81 views
Automated incremental backups to an external drive
Background
A client needs an automated backup solution to an external drive (to be taken offsite weekly). I'd typically suggest rsnapshot (or perhaps rolling out a custom rsync script), but this ...
2
votes
2answers
67 views
Comparing files and their properties
I get information of a certain set of files in my mail every day, which looks like this:
58623208 Sep 14 20:08 blbn_blfbe_drv
57904920 Sep 14 19:54 blbn_cycmn
55814208 Sep 14 06:02 clsa_Upd
38912000 ...
2
votes
1answer
50 views
shorthand for feeding contents of multiple files to the stdin of a script
Hi good people of this community,
Say I have a script called script, that reads from stdin and spits out some results to the screen.
If I wanted to feed it contents of one file, I would have typed:
...
4
votes
2answers
93 views
Should I be using 'sudo' in scripts that I write?
I'm setting up a new machine (well actually, an Ubuntu VM) and am trying to write a script to setup a few common things that I use when doing this (Git, curl, vim + janus).
So my script looks a bit ...
2
votes
3answers
37 views
How can I test if a program is running from within a script
Let's assume that another user started a bunzip process, and I have a script that I'd like to start running after that bunzip finishes. What's the best way to check from inside my script that the ...
2
votes
1answer
45 views
How can I use imagemagick's identify command in a script to tell if a JPEG file is invalid or corrupt?
I have a somewhat-kludgey script in which I want to copy valid, complete JPEG files to a photo album directory. I thought I could use ImageMagick's identify command to do this. The web documentation ...
3
votes
1answer
80 views
Help improving my AWK skills
This program works as I intended but I feel like I used some clumsy methods to get the out put I desired(especially with my use of print commands and variable declarations)
Could some one improve ...