This is a discussion on 'lot'-a-trouble ... within the Slackware Linux Support forums, part of the Unix Operating Systems category; --> Kleeb wrote: > Typical that I didn't think of simply rewriting the *whole* script again > whilst ssh'd into ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Kleeb wrote: > Typical that I didn't think of simply rewriting the *whole* script again > whilst ssh'd into slack. I was only changing bits of it, oblivious > to the fatal 'invisible' characters that were still present in the script. just use emacs from now on. it puts a big shiny 'DOS' in the status line when you edit a file with \n\r instead of \n. ;-) -- Joost Kremers joostkremers@yahoo.com Selbst in die Unterwelt dringt durch Spalten Licht EN:SiS(9) |
| |||
| On Mon, 23 Aug 2004 23:23:08 +0000, Kleeb wrote: > On 2004-08-23, Joost Kremers <joostkremers@yahoo.com> schrieb : >> c&p-ing it from the windows box? and after that, did you try running it >> locally again? i'm betting the answers here are yes and no, >> respectively. ;-) > > Kind of .. > it turns out. I wrote the script again in a Windows text editor (not > notepad, Crimson Editor) after hosing my dualboot XP/Slack box. I won't > bore you with the details of that experience. You probably could've run dos2unix on the script to fix the line endings, rather than rewriting it. But that doesn't matter now |
| |||
| On 2004-08-23, Joost Kremers <joostkremers@yahoo.com> schrieb : > Kleeb wrote: >> Typical that I didn't think of simply rewriting the *whole* script again >> whilst ssh'd into slack. I was only changing bits of it, oblivious >> to the fatal 'invisible' characters that were still present in the script. > > just use emacs from now on. it puts a big shiny 'DOS' in the status line > when you edit a file with \n\r instead of \n. ;-) I think vim does too. But I was like "oh, yeah DOS. cool". Aaannnnd carry on regardless ... Cordially, Kleeb. |
| |||
| On 2004-08-23, adam mcmaster <madcow@moosoft.net> schrieb : > > You probably could've run dos2unix on the script to fix the line endings, > rather than rewriting it. But that doesn't matter now Thanks for the tip. Given the amount of times I've looked at the script, I know it off by heart now. Unfortunately. Cordially, Kleeb. |
| |||
| Kleeb wrote: > On 2004-08-23, Joost Kremers <joostkremers@yahoo.com> schrieb : >> Kleeb wrote: >>> Typical that I didn't think of simply rewriting the *whole* script again >>> whilst ssh'd into slack. I was only changing bits of it, oblivious >>> to the fatal 'invisible' characters that were still present in the >>> script. >> >> just use emacs from now on. it puts a big shiny 'DOS' in the status line >> when you edit a file with \n\r instead of \n. ;-) > > I think vim does too. But I was like "oh, yeah DOS. cool". Aaannnnd carry > on regardless ... > Well, it's just a CR. It should ignore that, shouldn't it? ;-Q |
| |||
| On Mon, 23 Aug 2004 11:52:35 +0000, Kleeb wrote: > Thanks for the reply Joost. Here is my modified version : > > #!/bin/bash > /bin/date > echo -e "\nHere is the table of all the syndicate numbers ...\n" > /bin/cat -n /home/foo/lottery.txt > echo -e "\nWinning numbers :\n" > /bin/cat /home/foo/winhope.txt > echo -e "\nMatching lines :\n" > /bin/grep -nof /home/foo/winhope.txt /home/foo/lottery.txt <snip> > : No such file or directorytxt This looks like it may be the winner.. Try this: #!/bin/sh /bin/date echo -e "\nHere is the table of all the syndicate numbers ...\n" /bin/cat -n "/home/foo/lottery.txt" echo -e "\nWinning numbers :\n" /bin/cat "/home/foo/winhope.txt" echo -e "\nMatching lines :\n" /bin/grep -nof "/home/foo/winhope.txt" "/home/foo/lottery.txt" From what I can see, it might taking the '.' as something other than part of the name of the file. Maybe enough quotes will fix it up? Also, to keep from having to do a 'sh lot' on this to run it, you should be able to do a 'chmod +x lot' and then only have to type in './lot' And, being rather obvious here, but /home/foo/*.txt does have the proper permissions for the remotely logged in user, right? (you never know.. I've missed much easier stuff) :P I tried it both ways through putty and both times it worked just fine... -- Hayley (shooting at straws from miles away) leave one dot to email |
| |||
| On Fri, 27 Aug 2004 04:25:10 -0500, Hayley Wesson wrote: <chopslash> Bah, then I do a refresh and the rest of the freakin thread shows up... I see it's fixed already... Never mind... :P -- Hayley (better late than never?) leave one dot to email |
| ||||
| On 2004-08-27, Hayley Wesson <h.o.t.w.i.r.e.7.5@yahoo.com> schrieb : > On Fri, 27 Aug 2004 04:25:10 -0500, Hayley Wesson wrote: ><chopslash> > Bah, then I do a refresh and the rest of the freakin thread shows up... > > I see it's fixed already... Never mind... :P > Hey Hayley, thanks for your input anyway. Cordially, Kleeb. -- Remove the obvious gimp to email. Registered Linux (conf)User 365031 Unregistered Windows Clicker 0x000000E3 'I am just going outside and may be some time.' - Lawrence Oates (1880-1912). |
| Thread Tools | |
| Display Modes | |
|
|