Author |
Message |
don570

Joined: 10 Mar 2010 Posts: 5524 Location: Ontario
|
Posted: 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
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6629 Location: Valåmoen, Norway
|
Posted: 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
|
|
 |
vovchik

Joined: 23 Oct 2006 Posts: 1538 Location: Ukraine
|
Posted: 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
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 5524 Location: Ontario
|
Posted: 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
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 5524 Location: Ontario
|
Posted: 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
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6629 Location: Valåmoen, Norway
|
Posted: Sat 27 Nov 2010, 05:17 Post subject:
|
|
Thanks for sharing, - I'll keep it in mind
Sigmund
_________________ Stardust resources
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6629 Location: Valåmoen, Norway
|
Posted: Sat 27 Nov 2010, 05:18 Post subject:
|
|
Don570
will look at your trouble a bit later.......
Sigmund
_________________ Stardust resources
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6629 Location: Valåmoen, Norway
|
Posted: 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
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6629 Location: Valåmoen, Norway
|
Posted: 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
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 5524 Location: Ontario
|
Posted: 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
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 5524 Location: Ontario
|
Posted: 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
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 5524 Location: Ontario
|
Posted: 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
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 6629 Location: Valåmoen, Norway
|
Posted: 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
|
|
 |
RetroTechGuy

Joined: 15 Dec 2009 Posts: 2955 Location: USA
|
Posted: 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
WellMinded Search
PuppyLinux.US Search
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 5524 Location: Ontario
|
Posted: 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
|
|
 |
|