I'm trying to change the directory of the shell I start the ruby script form via the ruby script itself...
My point is to build a little program to manage favorites directories and easily change among them.
Here's what I did
#!/usr/bin/ruby
Dir.chdir("/Users/luca/mydir")
and than tried executing it in many ways...
my_script (this do...
Could someone of you show me how to effectively use "Scripting Engine" inside Java?
What are all the right use-case to use scripting engine?
Is there any open source project using "Scripting Engine"?
One thing comes to mind is "Closure, Functional programming" support is possible, but it is more of technical use than "Application Requ...
One of my clients needs to pull customer data from a web service periodically. The data itself is provided as CSV files via javascript postbacks, as is most of the navigation within the service's website.
Right now, the worst bottleneck in the entire system is the need for a human to log into the web page, navigate to the download page...
I have a cron entry that runs a script at a certain time each day. The script sets the DISPLAY to :0 and launches a program for the user to run (this is a single-user desktop). I want to change this so that the user first sees a dialog box so he can indicate whether he wants to run the program.
I'm using Ubuntu with Gnome. Is there s...
I'm trying to write a simple script around Lame to customize the program for my specific uses. What I'd like to do is parse out just the percent completeness from the Lame output.
Here's what the line looks like now:
./lame --nohist ~/Desktop/Driver.wav ~/Desktop/Driver.mp3 2>&1| egrep -o "\([0-9\%]+\)"
But that returns nothing. Here...
So, I've got a bunch of files with no extension. I want to write a windows batch script that will:
Find files with no extension (in a specified folder)
Add .bla to the end of the file name
I'm such a windows batch script noob I don't even know where to start. Suggestions?
...
I am working with numbers a lot when editing a particular type of file, and it's mostly tedious work. The file has a format like this:
damagebase = 8.834
"abc_foo.odf" 3.77
"def_bar.odf" 3.77
"ghi_baz.odf" 3.77
"jkl_blah.odf" 4.05
...
What would you recommend for writing a script that parses this and lets me progra...
For work I am moving over to windows after being on linux for quite a while. I want to get some scripting skills going for administrative tasks in windows. I am quite good with bash, but bash's "libraries/tools" are missing a lot when it comes to windows. I see vbscript, wsh, powershell, cmd, jscript, etc and wondering what to learn, or ...
Hi
I have a shell script on a Unix box which when executed sets the DISPLAY variable dynamicaly to the clients ip address and if the client has some sort of x windows up and running then it launches say a program ike xcalc.
I would want the shell script to launch the x windows say like exceed session on the winodws client when the shel...
I would like to write a script that checks out stuff from a repository every couple of hours, and I'd like to know if I could use SmartSVN from the command line to do it. If SmartSVN can't be used from the command line, what subversion client could I use? Please recommend one that supports authentication as well ( I'm hoping all of them ...
Xcode allows you to create automated scripts for performing repetitive tasks. What scripts have you written to speed up development?
...
We have a number of electronic test technicians with next to no programming experience. I would like a scripting language that is easy to learn with simple forgiving syntax that can integrate with .NET and invoke exposed static or singleton instance methods easily. What scripting language can meet these requirements?
Note: Perl is elim...
Hi,
I want to disable script errors from popping up in a VB6 application. (I have VB6 installed on this machine).
Currently, if I navigate to a particular page, it pops up saying "INternet Explorer Script Error: An error has ocurred in the script on this page" ... "Do you want to continue running scripts on this page?"
Setting the we...
I wrote a function in bash script. However, it's complaining about syntax. I really can't see what is it..... the error message is [: missing `]'
addem() {
if [ $# -eq 0] || [ $# -gt 2 ]
then
echo -1
elif [ $# -eq 1 ]
then
echo $[ $1 + $1 ]
...
I have a directory path stored in a text file, and I need to CD to that directory in a script but don't know how. I was hoping it would be something like
cat FILE | cd
but its not that easy.
This is a windows environment btw, in unix/linux it is easy:
cd `cat FILE`
Can anyone give me a hand?
...
I was browsing the source code of some website, and noticed a dll file being used as the src of a <script>.
(view-source:http://www.yellowbridge.com/onlinelit/baijiaxing.php)
It was something like: `
Several questions:
I didn't know a <script> could be anything besides js. What else can it be used for?
Can you point me in the direc...
What language do you prefer writing scripts for common tasks (backup, sync, etc.) and why? I'm not talking about programing web pages or applications. I've got this question when thinking why bash is still popular. For example python looks more comfortable for me. Do you use just because you know it or for some special reasons?
...
Basically I am wondering if it is possible to run a console script (.sh) from an iPhone App. The script is written to download a program from a repository that I set up, respring, then after a set time delete the program and respring again, so it needs root privileges, and is interactive in that the user can set how long the program will...
I'm working on a batch script that will let me delete files older then a set period using forfiles. For now, I'm aiming at printing the files that will be deleted.
The forfiles invocation I'm using works flawlessly from a cmd.exe shell, but as soon as I embed it into a batch script, it barfs. I suspect that this is due to the @ characte...
I have two variables declared as follows:
export portNumber=8888^M
export loginIP_BASE=10.1.172.2^M
I'm trying to print them both on a single line seperated by a colon ':' with the following script. It should look like "10.1.172.2:8888"
echo -n 'Login IP:'
echo -n $loginIP_BASE
echo -n ':'
echo $portNumber
but it it prints out the ...