Pschedule 1.1.6 - Task on time
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.
_____________________________________________
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.
_____________________________________________
Dear zigbert,
Would this be of any use to you: http://www.murga-linux.com/puppy/viewto ... 615#470615?
With kind regards,
vovchik
Would this be of any use to you: http://www.murga-linux.com/puppy/viewto ... 615#470615?
With kind regards,
vovchik
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.
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.
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
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: Select all
touch test1 && touch test2
Last edited by don570 on Sat 27 Nov 2010, 21:15, edited 2 times in total.
Thanks for sharing, - I'll keep it in mindvovchik wrote:Dear zigbert,
Would this be of any use to you: http://www.murga-linux.com/puppy/viewto ... 615#470615?
With kind regards,
vovchik
Sigmund
Re: bug explained
I could still not reproduce this in Puppy 5.1.1. In case this is related to the &-bug, please tray 0.9-2don570 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.
Thanks
Sigmund
bug with ampersand
The only bug I had was with the ampersand.
I'll test the fix and report.
I'll test the fix and report.
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
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.
___________________________________________________
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: Select all
cd /mnt/sda5 && arecord -d 7200 -f cd -D hw out2.wav
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.
___________________________________________________
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.
____________________________________________________
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.
____________________________________________________
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
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
- RetroTechGuy
- Posts: 2947
- Joined: Tue 15 Dec 2009, 17:20
- Location: USA
Re: explanation of ampersand bug
I thought that the standard Linux method to chain commands was the semi-colon ";"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 wasCode: Select all
cd /mnt/sda5 && arecord -d 7200 -f cd -D hw out2.wav
So your command becomes:
Code: Select all
cd /mnt/sda5 ; arecord -d 7200 -f cd -D hw out2.wav
Thus, something like this:
Code: Select all
./go_run_this_tedious_code_and_dont_bother_me_until_you_are_done -f go_away.dat &
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...
[url=http://murga-linux.com/puppy/viewtopic.php?t=58615]Add swapfile[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]
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.
_________________________________________
I read a book about Unix a couple of years ago.
Linux does things different obviously.
When in Rome do as the Romans do.
_________________________________________
- RetroTechGuy
- Posts: 2947
- Joined: Tue 15 Dec 2009, 17:20
- Location: USA
Re: double ampersand
I think I learned that under SunOS (erm...a couple decades ago)... Which also worked under Slackware, Debian, etc...don570 wrote: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 incognito, do as the cognito do...When in Rome do as the Romans do.
[url=http://murga-linux.com/puppy/viewtopic.php?t=58615]Add swapfile[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]
double ampersand
I remember now . I was installing netbsd unix
on an old mac computer and I started
reading about unix.
Here's the reference
Visual Quickstart Guide
Unix Third Edition
by Deborah S. Ray and Eric J. Ray
With Puppy linux there isn't many permissions issues,
so nobody uses the double ampersand.
Now I understand the confusion.
_______________________________________
on an old mac computer and I started
reading about unix.
Here's the reference
Visual Quickstart Guide
Unix Third Edition
by Deborah S. Ray and Eric J. Ray
Code: Select all
If you use && to combine commands,
the system will run both in sequence but
run the second only if the first succeeds.
For example, you could use
mv todolist todolist.done && touch todolist
to move your to-do list to a different file and
create a new to-do list. If the first command
fails (for example, because you don't have
permission to create a new file), the second
command won't run.
so nobody uses the double ampersand.
Now I understand the confusion.
_______________________________________
- RetroTechGuy
- Posts: 2947
- Joined: Tue 15 Dec 2009, 17:20
- Location: USA
Re: double ampersand
Aha! That's a valid reason to have such a command, in addition to ";" (which runs regardless)don570 wrote:I remember now . I was installing netbsd unix
on an old mac computer and I started
reading about unix.
Here's the reference
Visual Quickstart Guide
Unix Third Edition
by Deborah S. Ray and Eric J. Ray
Code: Select all
If you use && to combine commands, the system will run both in sequence but run the second only if the first succeeds. For example, you could use mv todolist todolist.done && touch todolist to move your to-do list to a different file and create a new to-do list. If the first command fails (for example, because you don't have permission to create a new file), the second command won't run.
I learned something new today! Thanks Don!
Well, most people don't even use the command line any more, so...With Puppy linux there isn't many permissions issues,
so nobody uses the double ampersand.
Now I understand the confusion.
I guess that I was aware that "&&" also worked, but because "&" is a "special character", I avoided it. From the error standpoint, I find that ";" is more well behaved -- and when it doesn't work, it doesn't do exceptionally strange things -- like backgrounding jobs...
BTW, it rather looked like part of the problem was that characters we being "quoted" rather than being operators...
There's that whole goofy list of special characters, such as: "&" versus "\&" and what's the really goofy one..."\\" which quotes "" as a character (I _think_)? ("" being the special character used for quoting, is difficult to "quote", so you have to "quote" it again...or is it twice more?)
Urgh!!!...
[url=http://murga-linux.com/puppy/viewtopic.php?t=58615]Add swapfile[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]
[url=http://wellminded.net63.net/]WellMinded Search[/url]
[url=http://puppylinux.us/psearch.html]PuppyLinux.US Search[/url]
Re: double ampersand
RetroTechGuy wrote:Aha! That's a valid reason to have such a command, in addition to ";" (which runs regardless)don570 wrote:I remember now . I was installing netbsd unix
on an old mac computer and I started
reading about unix.
Here's the reference
Visual Quickstart Guide
Unix Third Edition
by Deborah S. Ray and Eric J. Ray
Code: Select all
If you use && to combine commands, the system will run both in sequence but run the second only if the first succeeds. For example, you could use mv todolist todolist.done && touch todolist to move your to-do list to a different file and create a new to-do list. If the first command fails (for example, because you don't have permission to create a new file), the second command won't run.
I learned something new today! Thanks Don!
Mostly I see "&&" used after after tests. If using ";" it's just a new line of code....quite different.With Puppy linux there isn't many permissions issues,
so nobody uses the double ampersand.
Now I understand the confusion.
Code: Select all
[ "$1" = "" ] && echo "no arguments here" && exit