LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-04-2011, 12:51 PM   #1
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
Question Bash scripting - how to do something for several seconds?


Hello LQ.org!

What should bash script look like to do some stuff for several seconds? For example I want it to "cat" something for 20 seconds and then kill this "cat" process. Not in a line but in plain text file which can be saved as *.sh file.
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 12-04-2011, 01:05 PM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
Do you have timeout installed ? (man timeout)
 
2 members found this post helpful.
Old 12-04-2011, 01:17 PM   #3
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Original Poster
Rep: Reputation: Disabled
Yes I have. Thanks!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] bash: Convert decimal to minutes:seconds? DJCharlie Programming 10 01-26-2011 07:05 PM
[SOLVED] [bash] find printf seconds hashbang#! Programming 4 01-14-2011 08:17 PM
[SOLVED] Calculate duration in seconds in bash xeon123 Linux - Newbie 8 11-15-2010 12:03 PM
counter in tenth of seconds in bash unsolved Programming 7 10-09-2009 08:50 PM
[BASH]Timing an program, killing it after n seconds. ////// Programming 2 03-29-2007 08:38 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration