Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 23 Nov 2014, 16:23
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
Pschedule 1.1.5 - Task on time
Post new topic   Reply to topic View previous topic :: View next topic
Page 5 of 9 [130 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9 Next
Author Message
don570


Joined: 10 Mar 2010
Posts: 3379
Location: Ontario

PostPosted: Wed 24 Nov 2010, 20:18    Post subject: edit bug  

Pschedule.9

I came across this odd bug while using luci 238

I wanted to put some of the job info into the clipboard.

I selected the command , then clicked on Edit button.

It was easy to put the info into the clipboard,

But I found that the next button that you click is important.

If I click 'Cancel' to get rid of edit window everything is alright,

but if I click 'OK' this prevents me from transfering text to the clipboard again.

That's because the edit window has empty fields as shown in
image (click to enlarge)


I assume this is a bug.

_____________________________________________
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5786
Location: Valåmoen, Norway

PostPosted: Thu 25 Nov 2010, 04:31    Post subject:  

don570
I have read your post 4 times, and still not understanding the bug. Please keep in mind, - I am just a silly Norwegian with very limited global understanding. I have never been one of those smart guys, so maybe a couple of images would help.


Sigmund

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
vovchik


Joined: 23 Oct 2006
Posts: 1287
Location: Ukraine

PostPosted: Thu 25 Nov 2010, 08:30    Post subject:  

Dear zigbert,

Would this be of any use to you: http://www.murga-linux.com/puppy/viewtopic.php?p=470615#470615?

With kind regards,
vovchik
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 3379
Location: Ontario

PostPosted: Thu 25 Nov 2010, 14:16    Post subject: bug explained  

I'll explain how to reproduce the bug step by step.

1) click on a task (or job) on the list. That selects it.
2) Click on edit. That produces the edit window.
3) Copy some command info to clipboard.
4) Now click on OK button
5) Click on edit button a second time and command field is now empty.
It shouldn't be empty.

I'll try to reproduce it again and report back this weekend.
I should have tried another puppy variant.
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 3379
Location: Ontario

PostPosted: Fri 26 Nov 2010, 13:57    Post subject: discovered problem with ampersand  

There is problem with ampersand.
try command
touch test&&.txt
and go thru steps in previous post.


and try commands of my previous post of month ago

maybe other symbols as well

Edit:

try a better example
Code:
touch test1  &&  touch test2

Last edited by don570 on Sat 27 Nov 2010, 17:15; edited 2 times in total
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5786
Location: Valåmoen, Norway

PostPosted: Sat 27 Nov 2010, 05:17    Post subject:  

vovchik wrote:
Dear zigbert,

Would this be of any use to you: http://www.murga-linux.com/puppy/viewtopic.php?p=470615#470615?

With kind regards,
vovchik
Thanks for sharing, - I'll keep it in mind Wink


Sigmund

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
zigbert


Joined: 29 Mar 2006
Posts: 5786
Location: Valåmoen, Norway

PostPosted: Sat 27 Nov 2010, 05:18    Post subject:  

Don570
will look at your trouble a bit later.......


Sigmund

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
zigbert


Joined: 29 Mar 2006
Posts: 5786
Location: Valåmoen, Norway

PostPosted: Wed 01 Dec 2010, 04:42    Post subject:  

Version 0.9-2
See main post

Changelog
- Bugfix: Accept & in command (thanks to don570)
- Bugfix: Wrong Title in error-box.

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
zigbert


Joined: 29 Mar 2006
Posts: 5786
Location: Valåmoen, Norway

PostPosted: Wed 01 Dec 2010, 04:44    Post subject: Re: bug explained  

don570 wrote:
I'll explain how to reproduce the bug step by step.

1) click on a task (or job) on the list. That selects it.
2) Click on edit. That produces the edit window.
3) Copy some command info to clipboard.
4) Now click on OK button
5) Click on edit button a second time and command field is now empty.
It shouldn't be empty.

I'll try to reproduce it again and report back this weekend.
I should have tried another puppy variant.
I could still not reproduce this in Puppy 5.1.1. In case this is related to the &-bug, please tray 0.9-2


Thanks
Sigmund

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
don570


Joined: 10 Mar 2010
Posts: 3379
Location: Ontario

PostPosted: Sat 04 Dec 2010, 17:29    Post subject: bug with ampersand  

The only bug I had was with the ampersand.
I'll test the fix and report.
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 3379
Location: Ontario

PostPosted: Mon 06 Dec 2010, 19:54    Post subject: explanation of ampersand bug  

I didn't explain the ampersand bug very clearly.
It doesn't refer to a variable name having an
ampersand character.

What I was doing was to connect two commands with a double
ampersand &&

This is a method that I like
to use to complete one command completely then start another command.

The example I used was
Code:
cd /mnt/sda5 && arecord -d 7200 -f cd -D hw  out2.wav


This worked well in previous versions of pschedule, but then I
got ambitious and tried to see if I could edit the line in pschedule.
So here is what I did.

1) click on the task (or job) on the list. That selects it.
2) Click on edit button ---> That produces the edit window.
3) Copy some of command line to clipboard.
4) Now click on OK button
5) Click on edit button a second time and command field is now empty.
It shouldn't be empty.

I concluded that the ampersand character is causing pschedule
to become confused.

What I suggest is that when the edit button is clicked , a check for
the double ampersand is made and when the OK button is clicked,
reconstruct the two commands back together so that there is
some sense to the line of code again.

If that's too hard to do then you'd better go back to previous version.

I'm sorry for the confusion.

___________________________________________________
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 3379
Location: Ontario

PostPosted: Tue 07 Dec 2010, 16:10    Post subject: design to handle double ampersand  

I quickly drew up a design to show how to handle the double ampersand.

When the edit button is clicked , there would be a search for the double
ampersand in the task and if it was found, this window would appear.
Each command could be edited separately. Then click on the OK button
when the editing is concluded.





Once the edit window closes the two commands can be recombined
into one line of code and the regular window used.
____________________________________________________
Back to top
View user's profile Send private message 
zigbert


Joined: 29 Mar 2006
Posts: 5786
Location: Valåmoen, Norway

PostPosted: Wed 08 Dec 2010, 14:29    Post subject:  

don570
I have made some more testing, I find the latest (0.9-2) to work as expected. Please be aware of
- it adds a \ in front of the &. This prints the text-string (with &) correct, and you can edit the cron-task without corrupting the command.
- Adding a & to the command to run in background seems to me not logical, since cron itself continues after execution.
- To execute several commands in one cron-task, you should use the separator ';'


Sigmund

_________________
Stardust resources
Back to top
View user's profile Send private message Visit poster's website 
RetroTechGuy


Joined: 15 Dec 2009
Posts: 2668
Location: USA

PostPosted: Wed 08 Dec 2010, 15:37    Post subject: Re: explanation of ampersand bug  

don570 wrote:
I didn't explain the ampersand bug very clearly.
It doesn't refer to a variable name having an
ampersand character.

What I was doing was to connect two commands with a double
ampersand &&

This is a method that I like
to use to complete one command completely then start another command.

The example I used was
Code:
cd /mnt/sda5 && arecord -d 7200 -f cd -D hw  out2.wav




I thought that the standard Linux method to chain commands was the semi-colon ";"

So your command becomes:

Code:
cd /mnt/sda5 ; arecord -d 7200 -f cd -D hw  out2.wav


I'm somewhat wary of "&" since that's the standard "background this process" command.

Thus, something like this:

Code:
./go_run_this_tedious_code_and_dont_bother_me_until_you_are_done -f go_away.dat &


would go into the running processes, leaving your command prompt available for further commands.

Some other useful commands:

When a process is running from your command prompt: ^z = (control-z) suspend current process
To "background" that process: bg
To bring that backgrounded process back to the command prompt ("foreground"): fg

and so forth...

_________________
Add swapfile
Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 3379
Location: Ontario

PostPosted: Thu 09 Dec 2010, 19:15    Post subject: double ampersand  

I think I learned about the double ampersand when
I read a book about Unix a couple of years ago.
Linux does things different obviously.
When in Rome do as the Romans do.

_________________________________________
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 5 of 9 [130 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8, 9 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Desktop
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0876s ][ Queries: 13 (0.0058s) ][ GZIP on ]