Prev: UK only: Need advice concerning opportunities for Linux Engineers vs. Windows Engineers
Next: Thanks Bit Twister, John, & Michel!
From: Bit Twister on 15 Mar 2010 21:59 On Mon, 15 Mar 2010 20:53:13 -0500, Ohmster wrote: > from LDAP, but for now, I need a working script. So are you saying that I > need to copy and paste what is between these dotted line separators into > a text file with vim and execute it? I would have clicked up a terminal cat > geturls Highlight from usenet reader, paste in the terminal, and hit ctl d Set permissions with chmod +x geturls > Do I need to put "#!/bin/bash" at > the top of it? If you like. > > That's it? Paste this into a file called geturls in vim, chmod it to 755, > and then execute it in the same directory as where all the desktop > shortcut files are? Yep, looks good to me. > Do I need to prepare the desktop shortcut files in > any way such as give them all the same extension That is why the grep did not specify file extension. > or remove spaces? Hey, try it and see if url in a spaced file name shows up in the output file.
From: Bit Twister on 15 Mar 2010 22:06 On Tue, 16 Mar 2010 01:59:26 +0000 (UTC), Bit Twister wrote: > On Mon, 15 Mar 2010 20:53:13 -0500, Ohmster wrote: > > Hey, try it and see if url in a spaced file name shows up in the > output file. Frap, I just noticed, you need to change the " to \" in the colors section of the header. :(
From: Ohmster on 15 Mar 2010 22:10 John Hasler <jhasler(a)newsguy.com> wrote in news:87fx41t6zl.fsf(a)thumper.dhh.gt.org: > Create a directory and put all the "shortcuts" it. You'll have to unzip > the zips yourself. Make sure all the filenames end in ".url". Don't > worry about the spaces. Then run this (untested) command in the > directory: > > grep '^URL=http://' *.url | cut -f2 -d= > urls > > This will put a list of URLs in the file "urls". Do you want the > filename associated with each URL? Oh this is great, answers! And bit twister went so far as to give me school on it, this is great, you guys rock man. Okay, first let's try out John's command line to see if it works, preparing directory now... (I don't care about the filename as to where the url came from, but thank you for asking.) ....adding the url extension to all files in directory. I can use a Windows file renamer but I wonder if I could do that with mv? Hmmm, when in a Linux filesystem, these files ALL have the url extension, and I DO NOT have the stupid "Hide known file extensions" box checked in Windows! Now that really is odd, I wonder why Windows will not display that extension in explorer? What about in a command window or with the Windows version of ls? No, in a command window, all the files in Windows shows the url extension, whether checking with dir, ls, or ls -la, they all show the .url extension. Okay, onward and forward with John's test! Wow! That worked a treat, just like that, BAM! ...and it was all done. No output on the screen, no time processing the job, just bam and done. Thank you very, very much. I need this bit of script so into my scripts directory it goes. Now it will be fun to test and learn from Bit Twister. Thank you John! -- ~Ohmster | ohmster59 /a/t/ gmail dot com Put "messageforohmster" in message body (That is Message Body, not Subject!) to pass my spam filter.
From: Ohmster on 15 Mar 2010 22:27 John Hasler <jhasler(a)newsguy.com> wrote in news:87fx41t6zl.fsf(a)thumper.dhh.gt.org: > Create a directory and put all the "shortcuts" it. You'll have to unzip > the zips yourself. Make sure all the filenames end in ".url". Don't > worry about the spaces. Then run this (untested) command in the > directory: > > grep '^URL=http://' *.url | cut -f2 -d= > urls > > This will put a list of URLs in the file "urls". Do you want the > filename associated with each URL? This worked very well, thanks John, but it did get tripped up by at least one of the urls. I am telling and showing you this not to complain, but so that you can see what the error was and maybe how to fix it. This URL file was not read properly. [DEFAULT] BASEURL=http://www.xanadugallery.com/Art/SubjectList.asp?Inventory Category=3 [InternetShortcut] URL=http://www.xanadugallery.com/Art/SubjectList.asp?Inventory Category=3 IDList= [{000214A0-0000-0000-C000-000000000046}] Prop3=19,2 That "Inventory Category=3" is actually all part of the URL and is exactly how one has to visit that page to get the correct link. The script returned this URL: http://www.xanadugallery.com/Art/SubjectList.asp?Inventory Category The "=3" part is missing from the harvested URL. I am by no means "looking a gift horse in the mouth", but I thought that you should know about it. I wonder if Bit Twister's it of madness will fare any better? Oh this is such fun! -- ~Ohmster | ohmster59 /a/t/ gmail dot com Put "messageforohmster" in message body (That is Message Body, not Subject!) to pass my spam filter.
From: Ohmster on 15 Mar 2010 22:32
Bit Twister <BitTwister(a)mouse-potato.com> wrote in news:slrnhptptm.4nj.BitTwister(a)cooker.home.test: > On Tue, 16 Mar 2010 01:59:26 +0000 (UTC), Bit Twister wrote: >> On Mon, 15 Mar 2010 20:53:13 -0500, Ohmster wrote: >> > >> Hey, try it and see if url in a spaced file name shows up in the >> output file. > > Frap, I just noticed, you need to change the " to \" in the colors > section of the header. :( Apparently you want me to escape something with a backslash in the color section of the script here: <BODY BGCOLOR="Wheat" LINK="Blue" VLINK="Red" ALINK="Green" TEXT="Black" <H4 ALIGN="CENTER"> $PWD " > $_out_fn But what? What has to be escaped with the backslash Bit? -- ~Ohmster | ohmster59 /a/t/ gmail dot com Put "messageforohmster" in message body (That is Message Body, not Subject!) to pass my spam filter. |