Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

5
Multiple If statements failing...
Post Flair (click to view more posts with a particular flair)
Post Body

So I'm trying to sort out a large number of video files, based on length ($mdur below). Works fine on files that are under 10 minutes in length. BUT, anything longer than 10 minutes is being sorted into the 10 minute pile.

Here's the relevant section of code:

  if [ $mdur -gt 44 ]; then
    folder="Filler60"
  fi

  if [ $mdur -gt 29 ]; then
    folder="Filler45"
  fi

  if [ $mdur -gt 19 ]; then
    folder="Filler30"
  fi

  if [ $mdur -gt 14 ]; then
    folder="Filler20"
  fi

  if [ $mdur -gt 9 ]; then
    folder="Filler15"
  fi

  if [ $mdur -gt 4 ]; then
    folder="Filler10"
  fi

Here's an example output:

Filler10 - 00:05:51 - Cartoon - Chinatown My Chinatown
Filler10 - 00:06:27 - Cartoon - Choo Choo Fraidy
Filler10 - 00:09:16 - Cartoon - Circus Capers
Filler05 - 00:04:18 - Cartoon - Colonel Bleep - Arrival on Earth
Filler10 - 00:10:29 - Film - Are You Ready For Service - Getting Ready Physically (1951)
Filler10 - 00:11:03 - Film - Are You Ready For Service - Service and Citizenship (1951)
Filler10 - 00:21:07 - Film - Boosting is a Business (1950s)
Filler10 - 00:50:18 - Film - Destination Space (1959)
Filler10 - 00:23:59 - Film - Forty Billion Enemies (1941)
Filler10 - 00:16:23 - Film - Freeze-In
Filler10 - 00:15:40 - Film - Friendship Begins at Home (1949)
Filler10 - 00:08:34 - Film - Fun and Facts About American Business (1948)

I'm not worried about "efficiency" in my code. I just want something simple that works.

So please tell me, where am I going wrong with this?

Author
Account Strength
100%
Account Age
10 years
Verified Email
Yes
Verified Flair
No
Total Karma
19,425
Link Karma
6,051
Comment Karma
13,278
Profile updated: 5 days ago
Posts updated: 9 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
5 years ago