while : do
sleep 1 &
sPID=$!
read TIME < /proc/$sPID/stime
case "$TIME" in
$MYSTARTTIME)record >file.mp2 &
rPID=$!
sleep 30
;;
$MYENDTIME)kill $rPID
;;
esac
sleep 30
done
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
I was in C mode and thinking of stat/lstat and that they would correspond to the /proc/PID ... but they are in /proc/PID/stat in a difficult to interpret way (seconds since epoch)
the equivalent is
stat -c %y /proc/pid
but if you are going to do that, you may as well just use date
-sorry, couldn't do a shell only version (well not quickly or easy to follow)
see date --help for the formats
ex.
date +%D@%R
will give you
month/day/year@military time
which will let you do
STARTTIME="05/05/12@22:30"
CURRENTTIME=`date +%D@%R`
if [ "$STARTTIME" == "$CURRENTTIME" ]; then
#your record code here &
rPID=$!
fi
if [ "$STOPTIME" == "$CURRENTTIME" ]; then
kill $rPID
fi
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].
Regarding pschedule command and cron - it looks as though these are to schedule tasks on a regular basis rather than, in my case, simply recording "as needed".
Mercedes350se wrote:Regarding pschedule command and cron - it looks as though these are to schedule tasks on a regular basis rather than, in my case, simply recording "as needed".
Hello, I want to ask about how do we can copy paste the texts from console? I thought that we can right click after blocking the text to the notepad. but, It doesn't work. anybody can help me?
and also, how do I install my wireless? because, my laptop still don't detect any wireless extension when I type: iwconfig.
Hello, I want to ask about how do we can copy paste the texts from console? I thought that we can right click after blocking the text to the notepad. but, It doesn't work. anybody can help me?
To paste into a text editor, after you block-select (highlight) your text, go to your text editor and press your middle mouse-button or wheel at the location where you want it.
For your wireless issues, may i suggest you post a new thread for that, because this thread is about console operations.
Cheers,
russoodle
oops, Lobster beat me to it
[i][color=Green][size=92]The mud-elephant, wading thru the sea, leaves no tracks..[/size][/color][/i]
Lobster wrote:highlight text and click the mouse wheel
middle button or both buttons simultaneously
where you want text to appear.
May take a few attempts to get the hang of it . . .
it's still not working, Lobster.
I try to click the mouse wheel simultaneously and also try to click right n left button but it's still not appear. I look up into the "edit" menu but the "paste" is still not activated/highlighted.
any info again?
@russoodle: hello.
hmm.. I try to abiword for now, and the Paste is Highlighted for now.but, after I try to click it. nothing is viewed. I don't know the reason why is it hard for me for only copying the console texts to Wine Notepad or Abiword. T_T
Last edited by bakekoq on Thu 12 Jul 2012, 13:47, edited 1 time in total.
bakekoq, if you have a wheel-mouse, it should work just by clicking it to paste the text....the simultaneous left-right buttons are only an alternative option for those without a wheel or third button.
[i][color=Green][size=92]The mud-elephant, wading thru the sea, leaves no tracks..[/size][/color][/i]
thanks a lot for the help guys. I try it in wine notepad but it's not worked. but, after I try in Abiword it worked perfectly. So, I'll try to use abiword for the future to save the text from consoles.
@russoodle: I'll try to post my wireless problem after this post. Please help me for checking the log of dmesg or anothers.
Well bakekoq, why not use Geany for pasting text, as it's a text editor? Unless you're more comfortable with AbiWord, which is actually a word-processor.....just my preference, mind you..
Regarding output (log) of dmesg, enter the following code into the console:
ok, I'll try to use Geany in the future. I'm still not familiar with linux and the programs here. so, I still don't know what's good or better for using. yes, I already post the log in the new thread. please help me for the future.