This is a little thing that bothers me every now and then:
I write a shell script (bash) for a quick and dirty job
I run the script, and it runs for quite a while
While it's running, I edit a few lines in the script, configuring it for a different job
But the first process is still reading the same script file and gets all screwed up.
...
Hello,
I need to find out which library will be loaded given in the information returned from /sbin/ldconfig. I came up with the following:
#!/bin/bash
echo $(dirname $(/sbin/ldconfig -p | awk "/$1/ {print \$4}" | head -n 1))
Running this results with:
$ whichlib libGL.so
/usr/X11R6/lib
This a two part question:
Will this produ...
The problem is I am using get_info() to make a ajax call to Result.lasso and paste the response in div with id 'test'.I am unable to use the sendForm() function from the page where i am calling the get_info().
I have also tried using different versions of jQuery 1.1.1.3 is working fine.But i am facing the problem while using higher vers...
I've got a rather large MySQL database of various pieces of text. I need to slightly modify approximately 90% of all entries using standard string manipulation algorithms and some regexps.
All of my current DB manipulation scripts are PHP frontends for a website. Recommendations for a language/technology to do this in?
Support for JSON...
Hi
Quick one, 2>&1 redirect stderr to stdout, but what does the ampersand mean. I know if we had 2 > 1 it would output to file named 1, what does the ampersand do ?
Thanks
...
Since I am conversant in Ruby, I am about to script a few things on OSX using it. But then I thought, perhaps I am missing the boat. I know a lot of reasons to prefer Ruby over Bash (or whatever sh-compatible command language interpreter), but I don't know any reasons not to. What is the upside of programming the shell directly?
I inten...
Is there a way how to run MATLAB script from specific line without using GUI.
In GUI I use %%.
Thanks
...
I am currently working on a large project and will relatively soon need a scripting language for utility scripts, like deploying the project in full from source, checking and fixing the database, building a ready to deploy bundle, and so on. The project is written in PHP and I thought about using it, but I dismissed that as not suitable ...
I currently write a small game engine for 2D games in java.
As part of the engine I want to support scripts as the main way to implement in-game events.
the scripts may run a long time
several scripts can run parallel
calls to java code are limited
As I want to implement a save-game function I will have to get the current state of ...
I'm would like to modify a subkey in a plist file (i.e. "TB Item Identifiers"):
NSNavPanelExpandedStateForSaveMode = 1;
NSPreferencesContentSize = "{508, 413}";
NSPreferencesSelectedIndex = 6;
"NSToolbar Configuration BrowserWindowToolbarIdentifier" = {
"TB Display Mode" = 2;
"TB Icon Size Mode" = 1;
"TB Is Shown" = 1;
...
Is there a PHP script or piece of code I can type to change a WHM account's password?
...
Context:
On *nix systems, one may get the IP address of the machine in a shell script this way:
ifconfig | grep 'inet' | grep -v '127.0.0.1' | cut -d: -f2 | awk '{print $1}'
Or this way too:
ifconfig | grep 'inet' | grep -v '127.0.0.1' | awk '{print $2}' | sed 's/addr://'
Question:
Would there be a more straightforward, still porta...
Here's one for the bash-fu wizards. No, actually, I'm just kidding, you'll all probably know this except for me..
I'm trying to create a backup shell script. The idea is fairly simple: find files in a certain folder, older than 7 days, tar/gzip them to another directory, and remove them. The problem is, I'm not sure if I'll have enough ...
Is it possible to catch a classical ASP Scripting Timeout and redirect to a proper self defined error page, to avoid that the user sees the runtime error page ?
...
Hi,
I wonder what is the best scripting language for doing the following:
I go to this website
http://structure.usc.edu/make-na/server.html
and the input a two lines string like:
ATGC
TATG
Afterwards I push the "Make NA" button, so I download the resulting file, which I change the name before downloading it.
I would like to do t...
I want to cat an apache log and then output the result to a file. I want to match the day/month with the Apache log to the current/previous date, however I seem to be doing this incorrectly.
Sample from apache log:
62.173.92.62 - - [02/Mar/2010:15:46:58 +0000] "GET /img.......
Current script:
cat access_log | grep "\[+%d+/%b" > email....
My Application Database Without Project and without Source safe, i planned to make my DB to be as project and add it to TFS, but I have no idea how to script the stored procedures, Triggers, Views, Functions, and what is the best practice to Make Update Script for All My stored procedures, Triggers, Views, and Functions to My customers D...
Hi,
some short and probably stupid questions about PBS:
1- I submit jobs using
qsub job_file
is it possible to submit a (sub)job inside a job file?
2- I have the following script:
qsub job_a
qsub job_b
For launching job_b, it would be great to have before the results of job_a finished. Is it possible to put some kind of barrie...
Hi,
what is the simplest script using cURL of clicking a certain button on a website?
Thanks
...
How would I change the following markov script to treat capitalized and lowercase words as the same?
The entire idea is to help increase the quality of output of my markov text generator.
As it stands, if you plug 99 lowercase sentences into it and 1 capitalized sentence - you almost always find a non-markovized version of the capitali...