Im so proud of myself

Cogman

Lifer
Sep 19, 2000
10,284
138
106
#!/bin/sh

for i in 1 2 3 4 5 6 7 8
do
s=$(expr $i + 16)
title=S01Ep$s
echo $s
neroAacEnc -ignorelength -q 0.45 -if audio.wav -of $title.m4a &
x264 test.y4m -o $title.264 --no-psnr --no-ssim --threads auto --no-fast-pskip -t 2 --mixed-refs --me tesa -w --direct auto -A all --crf 20.0 -r 6 -m 7 -b 16 --b-pyramid --progress --b-rdo &
mplayer dvd://$i -vo yuv4mpeg:file=test.y4m -ao pcm:fast:file=audio.wav -alang en
done

Encoding videos in linux can be a pain, expecially when you have 30 min eps, 8 to a disk. No more (for me at least :D) Above is my great script to allow me to quickly rip videos off the disk.

So go ahead, show off you awesome scripting skills (this is one of my first shell scripts btw)

P.S. This may belong in the programming forum, but I figured it was really closer to *nix stuff then actual programming.
 

Netopia

Diamond Member
Oct 9, 1999
4,793
4
81
Now, for those of us who aren't fluent, how about documenting and remarking the script so we know what each step does, and why.

Joe
 

crontab

Member
Dec 20, 2000
160
0
0
quick tip, if you want to sent a sequence of numbers into input, just use

seq 1 8

as opposed to 1 2 3 4 5 6 7 8
 

rasczak

Lifer
Jan 29, 2005
10,437
23
81
You guys wouldn't happen to have a script for backups would you? I want to run a backup script for my linux boxes at logoff or shutdown. I'm googling but am not really finding much. (my google skills are terrible)
 

Crusty

Lifer
Sep 30, 2001
12,684
2
81
What do you want to backup? A home directory? A database? The entire OS?
 

rasczak

Lifer
Jan 29, 2005
10,437
23
81
my home directory. I've already got a base image ghosted, but I would like to have regular backups of /home/"all users" to store on a network share.
 

yoda291

Diamond Member
Aug 11, 2001
5,079
0
0
little do you realize that you'll be forced to make a small trivial change when your show hits season 2!!

muahahahahaha.

rasczak:have you tried
tar czf /network_share/`date +%Y%m%d`.tgz /home

Those be backticks around date.
 

Cogman

Lifer
Sep 19, 2000
10,284
138
106
Originally posted by: yoda291
little do you realize that you'll be forced to make a small trivial change when your show hits season 2!!

muahahahahaha.

rasczak:have you tried
tar czf /network_share/`date +%Y%m%d`.tgz /home

Those be backticks around date.

I, I, I don't know if I can handle that :p
 

skyking

Lifer
Nov 21, 2001
22,709
5,837
146
Originally posted by: rasczak
my home directory. I've already got a base image ghosted, but I would like to have regular backups of /home/"all users" to store on a network share.

If the share is on a another linux box, take a look at dirvish.
dirvish
It will do incremental backups of whatever, on a schedule. It is easy to get back to any version of a file it has saved. It utilizes rsync over ssh to do the dirty work.
 

rasczak

Lifer
Jan 29, 2005
10,437
23
81
Originally posted by: Cogman
Originally posted by: yoda291
little do you realize that you'll be forced to make a small trivial change when your show hits season 2!!

muahahahahaha.

rasczak:have you tried
tar czf /network_share/`date +%Y%m%d`.tgz /home

Those be backticks around date.

I, I, I don't know if I can handle that :p

Why do I have this ominous feeling?

hehe thanks, I'll try to see if that works.

Skyking, thanks, for the link. I'll take a look at that as well.