shanenin

Moderator
  • Content Count

    3752
  • Joined

  • Last visited

Everything posted by shanenin

  1. my understanding is bash is going to depeciate back ticks for substitutution. How would I change this line to an equivalent not using back ticks for i in `sed -n '/\.mp4$/p' /tmp/update`; do cp $SAMBA/$i $FMOVIES; done
  2. I think i got my script working well(those bugs will probably appear) It now sorts all of my different tv shows and movies and copies them to the correct destination directory. The only requiremant is my tv shows must be named similar to their directory. Example: the tv show "king.of.queens.704.avi" must match with the directory name "king.of.queens". Any media file that the script can't find where to copy it to is echoed to the shell so I can manually move it. Here is my final script #!/bin/bash FAVI=/home/shane/freevo/avi SAMBA=/home/shane/samba FMOVIES=/home/shane/freevo/movies if [ `w
  3. that modem appears to be supported under linux using usb, but I have not YET, found and specific info for knoppix.
  4. All of the boards have been extremely slow tonight. I think this is directly related to the release of starwars.
  5. every time I try to "fix something", I manage to create some other problem, it seems never ending.
  6. I fixed it with the use of a case statement. I changed the last part of my script to look like this. I also need to add a return 4 to my update_list function echo "samba needs to be mounted before proceeding" check_samba if [ $? = 0 ]; then update_list; else mount_samba; check samba; fi case $? in 0) update_list;; 1) echo "samba failed to mount, update incomplete exiting"; exit;; esac I have come to understand every script can be done in so many different ways.
  7. I guess it is not working totally correct. If samba is mounted before running the script it runs the update_list function twice. If I start the script without samba mounted I seems to run it correctly
  8. I have been wanting to write a a script that would copy media files off of my windows computer to my linux media center. I currently convert my dvds to mpeg 4 using nero-recode. I also download all of my tv shows to the windows computer, I choose the windows computer becaise it is left on more often. The reason I needed a script was do to my human error. I was ersaing video files before getting the transered over to my linux media center(thinking I already transfered them) I got my script half way done. I got it to the point of mounting samba and checking to see if I have new files to be trans
  9. that works nice :-) edit added later// I friend wanted a list of all of my movies on my harddrive. Here is the final command i ended up using ls freevo/{movies,movies2} | sed -n '/\.mp4/p' > movielist.txt that is like my 20th revisison ;-) edit added later// actaully I needed on more revision, the command above was also copying my movie.mp4.conf files that mplayer uses. I need to add a $ ls freevo/{movies,movies2} | sed -n '/\.mp4$/p' > movielist.txt
  10. I got mine on amazon. The bool is currently up to third edition, I got the first edition, so it was cheap. I do not see any of the first additions available, but they do have some used second edititions http://www.amazon.com/gp/product/offer-lis...9?condition=all
  11. I love my used copy of "sams teach your self shell scripting in 24 hours" The best $7.00 I even spent. I just learned the basics of sed, what a powerful tool. Understanding bash scripting(just a little) and the tools it uses is dramatically helping my linux skills. I would highy reccomend learning basic bash scripting as a powerful way to help you understand your linux system :-)
  12. this line seems to work sed '/.conf/d' movielist.txt > movielist2.txt Is there a way to do it without having to create a new file, by directly changing the original file?
  13. I have a text file, I would like to edit. I am sure there must be an easy command to do it. Below is the contents of an example file called movielist.txt incredibles.mp4 incredibles.mp4.conf italian-job.mp4 italian-job.mp4.conf jersey-girl.mp4 jersey-girl.mp4.conf jungle-book-2.mp4 jungle-book.mp4 jungle-book.mp4.conf killbill-vol2.mp4 killbill-vol2.mp4.conf killbillvol1.mp4 killbillvol1.mp4.conf I want to remove all lines that end with ".conf" I am trying to make a list that contains only movie files(.mp4)
  14. menu.lst may be a soft link to grub.conf, but is is the config file grub needs to boot. I have not tested it , but I do not think grub will boot with only a grub.conf file. I am pretty certain menu.lst is the only config file that is mandatory for grub to work. I bet the grub.conf file started to get added to distros, because people were used to using lilo.conf. below is a link i referenced http://www.gnu.org/software/grub/manual/gr...l#Configuration
  15. your way worked just fine :-) you also could have done the following to your menu.list file: default 0 change to default 1 default 0 means boot the first in the list, if you changed it to default 1 it would boot the second one on the list
  16. yup same error I made, works well now :-) I am not used to hacking the registry, more of an" /etc" kind of guy
  17. it did not work for me either. I will watching this thread and see if it was user error on my part, that would be most likely :-)
  18. lol. I have a problem :-) once I start looking for an answer, I have trouble letting it go. It is typical for me to spend 8 or more of my free hours a day googling for an answer. I can't get any peace until I find the solution. If it was my computer I would have the sound working, but I don't feel right about giveing hitest 25 different suggestions to try everyday. I know what would speed up this process, I need ssh access into his box(just kidding hitest) note my signature
  19. shanenin

    Help!

    those damn stray semicolins :-)
  20. for (int x = 0; x <=9; x++); do you need a space after <= I am sure that is not a problem(probably just a typo), it was the only thing I noticed, maybe someone else has a real answer.
  21. I just checked /var/tmp/portage, and I have about 500 mbs of stuff, I am guessing most of that is source code. As the bianaries are being built, wouldn't they also be left behind in /var/tmp/portage my bzip resultsa came in at 525mb so rzip at 457mb was a little better :-|
  22. oops, part of the reason was I had a bout 1 gb of compressed files in ubuntu install. Now that those are deleted I am getting better results. using rzip I compressed my 1.8 gb ubunutu install down to 457 mb I am in the process of using bzip2, I expect the results to be a little higher
  23. you could probably just do sudo gedit this will give you root privledges while using the graphical editer
  24. you might have better luck using nano, a text editer. Open up a terminal(place to type commands) then you will need to set a root password. use this command sudo passwd root after your password is set your will change to root with the su command. It will ask for newly acuired root password su then open up the file with nano nano /boot/grub/grub.conf then you can make chages to the file, and then press <ctrl> x to save.