I'm using CocoaDialog to present some feedback during execution of a download script. I wish to present an indeterminate progress bar whilst command operation us taking place. This is possible by piping text to CocoaDialog for the duration of the operation.
http://cocoadialog.sourceforge.net/documentation.html#progressbar_control
I tho...
Hi,
I am a shell script newbie. I want to know the difference between
${var%pattern}
and
${var%%pattern}
Thanks
...
Hi all,
Started to learn some shell scripting. I have a perl script that runs on one file. How would I write a shell script to run the perl script a bunch of times on all files with keyword "filename" in it?
So in English,
for /filename/ in filenames
perl myscript.pl completefilename
Thanks,
Michael
...
Hey everyone,
I have created a shell script to backup my webfiles + database dump, put it into a tar archive and FTP it offsite. Id like to run it X times per week however I only want to keep the latest 10 backups on the FTP site.
How can I do this best? Should I be doing this work on the shell script side, or is there an FTP command t...
I want to update some file in a server, with an automated script and the target files on a different server. Haven't started yet, but I think there will be authorization and connection issues during the process. Any suggestion on how I could approach?
Thank you
...
Hi,
How to get the current date value in epoch i.e., number of days elapsed since 1970-1-1. I need solution in unix shell script.
...
Hi all,
I have a simple question.
Is that possible to simulate an keyboard action ie: ctrl-a d for detach a screen in a script,
I need this to check in the screen the folowing keyword "SEGFAULT" an then restart the processus.
If you have any suggestion...
Best regards
Paca
...
I need to use scp update some directory at another server. It is similar to
for i in /usr/some/???/unknown/dir
do
cp /usr/some/file $i
done
so how can i do the search while the destination directories are on other server?
thank you
...
Hi people,
I have a text file, a.txt. Contents are:
$ cat a.txt
microsoft.com
google.com
ibm.com
I'm trying to run a host command on each line to get the IP address. Here is my script:
#!/bin/sh
for i in `cat a.txt`
do
echo $i
host $i
done
When i run it I get this:
$ ./a.sh
microsoft.com
Host microsoft.com\013 not found: 3(NXDOMA...
On a coupon site someone posted a shell script for finding Godaddy discount codes.
1 - Could someone explain how this script works?
Specifically, I'm confused about the syntax:
links url -dump | grep AI
2 - Does shell scripting allow you to spider a site just as perl/python/ruby would?
3 - Is the most efficient way to accomplish...
I want to match just the folder name that a file is in,
eg:
pic/2009/cat01.jpg
pic/2009/01/cat02.jpg
I want to just match what I put in bold.
So far I have this:
[^/]*/
Which will match,
pic/2009/cat01.jpg
Any idea?
...
I am trying to perform a big checkin of a lot of semi-automatically generated files, and they should all have svn:mime-type properties. I've set a lot using find, but how do I now find all those remaining files that are to be added and which haven't had a MIME type assigned?
...
Im trying to use inotifywait to detect every time a file or folder gets moved into a folder in realtime (eg. /root in the case)
I tried this, which does detect both folders and files, but this is for a created file, I want it for a moved file/folder.
inotifywait --monitor --format %f --event create /root
So then I use this, but using...
I was thinking of using inotifywait to watch the original folder where the original folders are in, then when ever it detects that a folder has been deleted, then delete the same symbolic link in the other folder.
So my question is, is that the best way? Or are there better ways to delete a symbolic link when the original folder gets de...
Dear Gurus,
I am using NetBeans 6.5 and whenever I save a LessCSS file I would like to run less compiler to compile it to native css. How do I go about achieving this?
Many Thanks.
Ravi
EDIT: I can do a build file as Kim recommended below. I am searching for a solution where I can run an external command. So the question now is How Do ...
Hi, i created a crontab which will run a bash script test.sh. This test.sh file requires some input from the user, and saves the user input into a variable. How do i ensure that the user input will be saved to a variable in test.sh, and when crontab runs the script i can get the output i want?
for e.g i have 2 files, file1.sh and file2....
Borderline ServerFault question, but I'm programming some shell scripts, so I'm trying here first :)
Most *nixes have a command that will let you pipe/redirect output to the local clipboard/pasteboard, and retrieve from same. On OS X these commands are
pbcopy, pbpaste
Is there anyway to replicate this functionality while SSHed into ...
I'm very low with shell scripts..
I need to check with a cron (no problem for this) if my connection is up. If it isn't, i want to call some scripts to reconnect.
I was thinking about using grep and ping to some site (or ip), then check the returned string.
Then call my command:
sudo pppd call speedtch
I need a clue thanks! Or ther...
I'm looking for a script I can run to check if a text file is empty, if it is then do nothing but if it has something in it, I want it to send me an email with the text file as the message. No idea how to do it.
...
Hello,
Do you know how to extract attachments from a raw mail message on Unix?
I want to do it from shell script (ksh). The mail file is the raw e-mail with headers and encoded attachments..
PS: I can't use perl!
Thx.
...