Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Saturn

Pages: [1]
1
Off Topic / I Need Help Creating A M3u Playlist.
« on: March 27, 2004, 04:01:41 PM »
Linux and Unix lack the more robust error checking that Windows has.  In Windows, both "/" and "\" will work fine for locating files on the localhost, etc.    Just like you can type upper/lower case file names and folders and it does not matter.

In both Linux and Unix, the user is expected to be somewhat knowledgeable and mindful of the details (anal Retentive is more like it).  Personally, I'd love to see a kernal that supported Windows style error checking for us Window using Linux users, but what good would it do?  I'm afraid I can't command line compile anything in Linux having grown up in windows! rofl.  Point being, you have to be exact with the case and appropriate slashes in Linux and Unix.  I believe you can enable a tab-completion feature in some Linux builds.  Start typing a name of a file within a directory and hit tab and it will give you the first match in alphabetical order.  Hit tab again and you will get the second, and so on.  This is a wonderful feature for those files with eighty-gazillion characters such.

As for your winamp thread, you may want to add something like the below code so you don't have to Kill/Halt/Terminate ID your script to turn it off.  Courtesy of pages 420-421 of the Red Hat Linux Bible 9.0.

Code: [Select]
# ! /bin/bash
#
Count=1
while :
do
  echo -n "$Count  Continue? (y/n): "
  read ANS
  case "$ANS" in
  y|Y)  break
      ;;
  esac
  let Count+=1
done
exit 0

Quoted From Text:
The colon (:) on the fourth line does absolutely nothing.  It functions only as a placeholder, and allows the while loop to repeat until a y or Y is entered (causing the break to exit the loop).  The Count variable keeps track of the number of times the loop has run.  The -n option to echo suppresses the printing the new line and positions the cursor just beyond the Continue? (y/n): prompt to wait for input.

Pages: [1]