Fedora :: Make BASH Script Wait For A Few Minutes?

Nov 26, 2009

I'm using bash script now,and I want have a script that can do like this: first ,tell me it will shut down ,and then shut down.My script looks like this:

#!/bin/sh
/usr/bin/curl $stop_page
shutdown -h now

[code]...

View 4 Replies


ADVERTISEMENT

Ubuntu :: Bash Script Will Not Wait For Nautilus To Exit?

Oct 24, 2010

I'm having trouble with a bash script. Does anyone know why this doesn't work?

Code:
nautilus ./ &
wait $!

I'm writing a script which will extract a series of .rar files, present the extracted files to the user in nautilus so they may modify them, then when the user closes nautilus, the modified files are packed back into the archive.

View 9 Replies View Related

Software :: Bash Script: Wait For Input From Kdialog Before Doing Sth?

May 27, 2011

The goal of the script is the following:Whenever I leave my house, my wife comes to my computer to check her mails (She has two computers of her own but they have a dangerous operating system, so they have been banned from the internet).She shuts down qbittorrent so as to download all her mails, and she forgets to execute it again on 98% of the times. End result: my computer is sometimes turned on for 10 hours doing absolutely nothing.I had therefore two choices: a) get on my wife's nerves until she gets the problem or b) write a bash script.If you are married, you will understand that bash scripts are easier to deal with than spouses.Ergo, I wrote the following script:

Code:
#!/bin/bash -x
while true ; do

[code]...

View 3 Replies View Related

Ubuntu :: Make Conky Wait To Start?

Apr 25, 2011

how do I make conky wait to start? I have read the post how to do it but when I try it says file not found.

View 9 Replies View Related

General :: Make Shutdown Wait Until Service Is Stopped?

May 6, 2011

I have a third party application with a database.

I have created the service but it does not wait for the database to shutdown before the systems continues with the shutdown.

This results in the database being seen as crashed.

here is my stuff i did.

CACHE START AND STOP SCRIPT FOR REDHAT

#vi /home/cacheusr/cache_ctrl
Insert below
#!/bin/sh
#
# /etc/rc.d/init.d/cache_ctrl
# Cashier Control Script
#
# chkconfig: 2345 55 01
code....

View 9 Replies View Related

General :: Make Shell Script Wait For A Particular Key Pressed In Order To Proceed?

Jan 30, 2010

i've been searching all over the internet for a way to let the user press a particular key let's say 'y' without the user having to press [Enter] as confirmationfor yes, this would then run another function.

Quote:

Book Inventory Summary Report:-

Title, Author, Price
______________________________
StarWars EP1, G.Lucas, $49.59
Harry Potter, Rowling, $45.98
The Matrix, Mr. Smith, $53.98

Press 'y' to make a copy of this result into a file or 'n' to return to the main menu.. I understand the "press any key to continue" would go something like

Code:

read -sn 1 -p "Press any key to continue.." But i try many different ways of getting the "press a particular key" function, and none of them works.

View 5 Replies View Related

Programming :: Bash Wait For One Line To Finish Before Going To The Next Line?

Jan 10, 2011

I have a wrapper script called MAIN.sh that runs several other script. It looks like this:

Code:
#! /bin/sh
script1.sh

[code]...

View 6 Replies View Related

Programming :: Bash: Convert Decimal To Minutes:seconds?

Jan 13, 2011

I have a script in the works that reads an MP3 file and gets the track length. Trouble is, it gives me the total seconds, like this:

Sample Track.mp3 = 225.55 seconds

What I'd like to have is that 225.55 converted into minutes:seconds format (in this case, 3:45). How can I do this?

View 10 Replies View Related

Ubuntu :: Get Cron To Run A Bash Script Every 15 Minutes To Change Desktop Background?

Jul 11, 2011

I'm trying to get cron to run a bash script every 15 minutes to change my desktop background

running crontab -e I added

Code:

*/15 * * * * sh /home/ME/Documents/scripts/background.sh

(at first i didnt have the sh before the path of the script but read somewhere i needed that) But it doesnt seem to be running my script works fine if ran straight from the terminal so Dont think thats the problem.

View 9 Replies View Related

Ubuntu :: Make CPU Scale Up When 100% Is Used Regardless If 80% Of That Is "io Wait"?

May 23, 2010

When I run large rsync sessions (backup purposes), I often find that the cpu goes up to 100% on both cores, and the systems gets almost unusable as slow it is. Top reveals around 80% is reported as "wa", which is IO Wait right?

Well, using the CPUfreq applet, it is possible (but irritatingly sloow) to manually set the cpu frequency to the highest possible. After this the computer gets much more snappy. How can this be done without manual intervention, anyone knows?

View 1 Replies View Related

General :: Make Sudo Session An Hour And Not Few Minutes In Ubuntu 10.04?

Jun 7, 2010

How I can make sudo Ubuntu 10.04 session an hour and not few minutes?

Now I have to write my password for sudo commands every few minutes.

View 4 Replies View Related

Fedora :: Proliant G4 Becomes Non-responsive @ 100% Wait?

Jul 1, 2011

I've installed both Fedora 15 x64 and Fedora 14 x64 on an HP Proliant DL380 G4 with the HP SmartArray SCSI controller, 2x146GB UW320 SCSI drives.The server was running RH v4 with a hardware RAID 1 with uptime of 400+ days with no issues.I broke the HW RAID and made 2x volumes and software RAID. I have another identical server with 4x 146GB UW320 SCSI drives with Fedora 12 x64 and SW RAID, so I figured 14/15 should be the same process.What happens is the server runs great for a while, but when I leave it for a few hours, it becomes non-responsive. I've re-installed 15 and 14 multiple times now and also installed NRPE, which shows load increasing to the point to where the server is non-responsive. It hits high load levels (as reported by NRPE). The load levels appear to be increasing over time. Such as last night:

log off at midnight, load average 0/0/0
2:03 am - WARNING - load average: 9.91, 8.85, 6.75
3:03 am - WARNING - load average: 16.91, 15.86, 14.47

[code].....

View 4 Replies View Related

Programming :: CURL In Bash - Error "Upload Is Disabled During Short Maintenance Work (ETA 10 Minutes). Brb"

Mar 7, 2010

i'm trying to write a bash script to upload an image to [URL], but i can't get i working properly. Everytime i try, the html returns me a error saying "Upload is disabled during short maintenance work (ETA 10 minutes). Brb!", while from the browser everything works fine. This is my current command line:

Code: curl -L -b cookie-pix.txt -c newcookie.txt www.pixhost.org/cover-upload -A "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" -F 0=@/home/admin/Desktop/karm.jpg -F content_type=0 -F press=Upload And this is the html of the form:

[Code]....

View 1 Replies View Related

Fedora Servers :: Stop Script Unmounts Drive With Function To Wait

Nov 3, 2009

I have a start and stop script registered with chkconfig for a fuse mounted drive. I can /sbin/service scriptname start
and
/sbin/service scriptname stop
with no issues.

The stop script unmounts the drives and then stops the service with a function to wait until the pidof service is gone. My drives are showing up as dirty on reboot, which should mean that my script that functions normally in cli, is running out of time and possible being ignored by service after a certain wait period when shutdown -h now is issued. System is a remote server so I can not view the output during shutdown. How can I increase the wait before /sbin/service issues a [FAILED] if that is the case on shutdown? The startup script runs, however the shutdown script does not...the script does work though with the service scriptname stop command.

View 5 Replies View Related

General :: `mencoder` Captures 10 Minutes Of Audio In Less Than 10 Minutes?

Mar 15, 2011

I'm using mencoder to capture audio from a Encore ENLTV-FM3 video capture device. I have recently noticed that, since one week ago, when the machine was forcibly restarted due to a power outage, all recordings are slightly pitched, they play back slower than they should.

I narrowed down the problem to the following command line:

$ time mencoder -really-quiet -tv driver=v4l2:device=/dev/video1:chanlist=us-cable:audiorate=32000:alsa:adevice=hw.1:input=0:amode=1:normid=11 -endpos 00:10:00 -ovc copy -oac pcm -of rawaudio -o test-32000.wav tv://69
real 9m54.886s
user 0m5.536s
sys 0m1.740s
$ ls -l test-32000.wav
-rw-r--r--@ 1 martin martin 76800000 Mar 15 17:20 test-32000.wav

Somehow, mencode managed to gather precisely 10 minutes worth of raw audio in 9m 55s. That's not physically possible, unless the capture device's A/D converters are "overclocked". I can't think of any other explanation besides hardware failure. Can that be? Could it be that something got burnt during the power outage and now the capture device's internal clock went nuts?

Since the machine's restart, I've also noticed dmesg is flooded with entries like this:

CE: hpet increased min_delta_ns to XXX nsec

Which seem to indicate that the computer's high precision event timer is somehow out of sync. Does this have to do with the audio issue? Can it be that the audio converter's sample rate is linked to the HPET? I'm totally lost here. Has anyone bumped into something similar?

View 2 Replies View Related

Ubuntu :: Bash: How To Make ${var%% *} Work

May 1, 2011

bash: how do you make the construct ${var%% *} work? I am trying to select the first word from a variable which contains many space-separated words. I am running Ubuntu 10.10 with GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu) and when I try to use this construct, the expression returns the complete variable with no removal of trailing anything.

View 3 Replies View Related

Ubuntu :: Need To Make Bash Script Files

Apr 16, 2010

I need to know what is the best method for teaching yourself how to make bash script files

View 8 Replies View Related

Ubuntu :: Make Bash Script Files?

Apr 16, 2010

I need to know what is the best method for how to make bash script files

View 4 Replies View Related

General :: Make A Bash Script Ask For A Specific Key?

Nov 21, 2010

I am attempting to learn how write bash scripts. I want one to ask for a specific key. For example, I want it to ask a question, then if it is like, y for yes, or n for no, it does a specific thing. I'm thinking it would be something like:

Code:

#!/bin/bash
echo "Are you a boy? y/n"
read -t3

View 14 Replies View Related

General :: Make A Bash Script Into A Daemon

Aug 7, 2011

i've written a script that will move some files from one directory to another, i dont know if this is the right place to ask but, this is on my ipod touch and i'm wondering how to make it run periodicaly

View 6 Replies View Related

Programming :: Make Bash Replace The Value Of A Variable?

Apr 18, 2009

I have a program I am writing where I have a for loop and I want to make it substitute the variable twice like:

for ((i=0;i<5;i++)) do
echo $"$i"
done

[code]...

View 3 Replies View Related

Fedora :: Sleep Once After 10 Minutes

Dec 24, 2009

I am using fedora 11. I have disable power management and screensaver.

[Code]....

However, when I reboot my computer, it will still come to a black screen after 10 minutes. When I move my mouse once, it never sleep again.

View 8 Replies View Related

Fedora :: X Crashes Exactly 10 Minutes After Log On ?

Mar 3, 2010

X crashes exactly 10 minutes after log on, and I am returned to log in screen. I am running: Kernel Linux 2.6.30.10-105.2.23.fc11.i586. Gnome 2.26.3. on a Dell Laptop.

View 3 Replies View Related

General :: Make Bash And It's Apps Automatically Resize?

May 29, 2011

I'm working in Debian, and I've noticed that when I resize my PuTTY window, the console inside isn't resizing to the new dimentions, so things like nano are running at 80xwhatever instead of the more useful 130xsomething that I've offered it.

View 2 Replies View Related

Ubuntu :: Make A Automated Build-script With Bash

Apr 13, 2010

I'm trying to make a automated build-script with bash but i keep getting different errors.

Code:

#!/bin/bash
gpg --import /home/epm/first_installation/config_chroot_sources_local.gpg
gpg --import /home/epm/first_installation/config_chroot_sources_packages-inl-fr.gpg

[code]....

View 5 Replies View Related

Programming :: Make A Automated Build-script With Bash?

Apr 14, 2010

I'm trying to make a automated build-script with bash but i keep getting different errors that I can't seem to figure out. Could anyone please tell me what's wrong with this package of build-scripts? I'm posting the main build-script and attaching the rest of the scripts in a compressed form. The errors mainly comes from the scripts in "/first_installation/usr/share/siem-live/init"

[Code]...

View 2 Replies View Related

Programming :: Bash Script - Make Sure All Files Have Certain Permissions

Jan 14, 2011

How can I iterate over all the files in the current directory to check for certain permissions? This is what I have:

Code: #!/bin/bash
for file in *.tar.gz
do if [ -r "$file" ]
then echo "$file is readable"
else echo "$file is NOT readable"
fi done

But this only checks that the current user has read permissions for each file. I want to check that the group "others" has read permissions for each file. How can I do this? Is there a built in function to check if a file has read permissions for the "others" group? Otherwise, I thought I might be able to use this:
Code: $ stat --format=%a file
744 And parse the output "744" and make sure the 3rd number is between 4 and 7 (since the octals 4-7 have read permissions for others).

View 2 Replies View Related

Software :: Make Craig's List Ad Notifier In Bash?

Jan 7, 2010

I have OpenSuSE 11.2, and I am learning Bash scripting. I was wondering how I would make a bash program, That I could have it check multiple craigslist sites [western mass, worcester mass, etc], e.g. in the Free category, and/or enter keywords, and have it update every 5 minutes, and then post the results somewhere, to a file, or even upload it to a server, or if it's even possible? (Kind of like the program "Ad Notifier for Craigslist") Would I have to do this in C/C++? If it has to be done in C/C++ It would have to be windows compatible preferably.

View 2 Replies View Related

Software :: Make Ctrl + Backspace Work In Bash?

Jan 18, 2010

I've tried without luck to get ctrl-backspace working to delete the previous word in bash. I edited my .inputrc and tried the following:

"C-": unix-word-rubout
Control-Rubout: unix-word-rubout

I can make it work if I change it to some other sequence (Control-j: unix-word-rubout makes ^j erase the word), but I can't make it work with backspace.

View 6 Replies View Related

Programming :: Bash : How To Make Firefox Open But Minimize

May 3, 2011

I am relatively new to scripting, but I was wanting to open a firefox window from a bash script, but have it open, then minimize. In the script, I have a single instance of: firefox & but is there a way to minimize it, versus have it displayed on the screen? I was wanting the command terminal to remain visible and it can't since the firefox window is open in front of it. I looked all over the place, including the man pages, but to no avail. I can make the height and width changes, but no minimize. Either that, or to be able to bring the terminal window back to the front automatically.

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved