rendered paste body#!/bin/bash
# PSXC IMDB INFO #
##################
# Just edit the 2 lines below, then continue on the "real" config file.
# your glftpd root path.
GLROOT=/glftpd
+ GLROOT=/glftpd
# path to the config file when chrooted by glftpd.
CONFFILE=/etc/psxc-imdb.conf
+ CONFFILE=/etc/psxc-imdb.conf
## End of config ##
###################
# version number. do not change.
VERSION="v2.7i"
+ VERSION=v2.7i
######################################################################################################
RECVDARGS="$1"
+ RECVDARGS=
# check if configfile exists
############################
if [ -r $GLROOT$CONFFILE ]; then
. $GLROOT$CONFFILE
if [ $? -ne 0 ]; then
echo "Unable to open config file ($GLROOT$CONFFILE). Forced to exit."
exit 0
fi
elif [ -r $CONFFILE ]; then
. $CONFFILE
if [ $? -ne 0 ]; then
echo "Unable to open config file ($CONFFILE). Forced to exit."
exit 0
fi
else
echo "Config file not found. Forced to exit."
exit 0
fi
+ '[' -r /glftpd/etc/psxc-imdb.conf ']'
+ . /glftpd/etc/psxc-imdb.conf
#!/bin/bash
##################
# PSXC IMDB INFO #
#######################################################
# http://www.grandis.nu/glftpd | http://www.glftpd.at #
#######################################################
#######
#CONFIG
##########################################################################
### Global settings. Unless you use a somewhat modified version of ###
### glftpd, these variables will be okay with little or no ###
### modification. ###
# this set the debug level. valid levels are 1 to 4. the higher the
# number, the more output. To disable, set to "" (default). "ON" is
# the same as "2".
# Level 1: check a couple of flags for changes.
# Level 2: show what is processed in psxc-imdb.sh.
# Level 3: show what is processed in psxc-imdb.sh, and what commands
# are given.
# Level 4: show what is processed in psxc-imdb.sh and in the bash
# addons, and what commands are given.
DEBUG=""
++ DEBUG=
#DEBUG="2"
# your glftpd root path.
GLROOT=/glftpd
++ GLROOT=/glftpd
#GLROOT=""
# this path is usually sufficient for chrooted env. - no need to change.
PATHCHROOTED=/bin
++ PATHCHROOTED=/bin
# PATH variable. Make sure you have all needed executables.
PATH=$GLROOT/bin:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin
++ PATH=/glftpd/bin:/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin:/usr/local/sbin
# logfile used - chrooted version. This file logs dirname and imdb-url. This
# is not the logfile for imdb output - that comes later in the config.
IMDBLOGCHROOTED=/ftp-data/logs/psxc-imdb.log
++ IMDBLOGCHROOTED=/ftp-data/logs/psxc-imdb.log
# path to logfile for imdb lookups. Same as above (IMDBLOGCHROOTED), just
# with the path outside glftpd's chrooted environment. Should not be changed.
IMDBLOG=$GLROOT$IMDBLOGCHROOTED
++ IMDBLOG=/glftpd/ftp-data/logs/psxc-imdb.log
# path to a logfile which keeps a specified number of IMDb urls.
# this is used to prevent the bot from showing IMDB info again and
# again for the same file.
IMDBURLLOG=$GLROOT$IMDBLOGCHROOTED.keep
++ IMDBURLLOG=/glftpd/ftp-data/logs/psxc-imdb.log.keep
# pidfile.
IMDBPID=$GLROOT$IMDBLOGCHROOTED.pid
++ IMDBPID=/glftpd/ftp-data/logs/psxc-imdb.log.pid
# the number of IMDB urls to keep in the logfile (above). This will prevent
# duplicate imdb outputs if the same movie is uploaded more than once. Use
# 0 to disable.
KEEPURLS=10
++ KEEPURLS=10
#KEEPURLS=0
# location of the file data for the bot is parsed to, normally glftpd.log.
# you might want to change this if normal output doesn't work, or changing
# the TRIGGER won't help, or writing to glftpd.log isn't possible.
# Remember to use psxc-imdb-full.tcl if you use something other than the
# glftpd.log. Read README for more info.
GLLOG=$GLROOT/ftp-data/logs/glftpd.log
++ GLLOG=/glftpd/ftp-data/logs/glftpd.log
#GLLOG=$GLROOT/ftp-data/logs/psxc-moviedata.log
# This logfile is used by the script on !imdb lookups. If you have
# psxc-imdb-find.sh installed, you either have to add a bunch to dZSbot.tcl
# or use the "full" mode in psxc-imdb-bot.tcl.
# psxc-imdb-find.README has more info - it's suggested you read it.
# Setting this to "" will log all !imdb requests to GLLOG (default)
#PSXCFINDLOG=""
PSXCFINDLOG=$GLROOT/ftp-data/logs/psxc-moviedata.log
++ PSXCFINDLOG=/glftpd/ftp-data/logs/psxc-moviedata.log
# a temp file used to fetch imdb info.
TMPFILE=$GLROOT/ftp-data/logs/psxc-imdb.tmp
++ TMPFILE=/glftpd/ftp-data/logs/psxc-imdb.tmp
# bold character used for bot. Use "" to disable.
BOLD=""
++ BOLD=
# quote char used. Since tcl and bash freaks out on a few chars, the
# script replaces these with the following. Currently, only " is replaced
# Do not use " or ` or some other special char here!
QUOTECHAR="'"
++ QUOTECHAR='
#QUOTECHAR="_"
# should the script look up business data for the opening weekend on the
# movie? use "" to disable.
USEBUSINESS=""
++ USEBUSINESS=
#USEBUSINESS=""
# Show premiere date? Will show date of first public showing/premiere of the
# movie. Premiere date takes precedence over public showing like Cannes etc.
USEPREMIERE="YES"
++ USEPREMIERE=YES
#USEPREMIERE=""
# Show limited date? Will show first date of limited showing.
USELIMITED="YES"
++ USELIMITED=YES
#USELIMITED=""
# Lynx retries. This is helpful for those times lynx fails for some reason
# to look up the imdb info.
LYNXTRIES=3
++ LYNXTRIES=3
# Lynx flags used. Should probably not be changed, but if the script seem to
# fail to look up a lot of imdb infos, you might wish to up the
# -connect_timeout=<seconds> to 20 or 30, depending on your internet line to
# USA. Earlier versions of lynx do not have this flag, though, so please
# check first.
# If you run everything chrooted, use the 2nd line, and make sure lynx.cfg
# exists.
LYNXFLAGS="-dump -nolist -width=1000 -hiddenlinks=ignore -connect_timeout=10"
++ LYNXFLAGS=-dump -nolist -width=1000 -hiddenlinks=ignore -connect_timeout=10
#LYNXFLAGS="-dump -nolist -width=1000 -hiddenlinks=ignore -connect_timeout=10 -cfg=$GLROOT/etc/lynx.cfg"
# To improve reliability even more, the use of wget can help. It's usage is
# reccommended. Use "" to disable.
USEWGET="YES"
++ USEWGET=YES
#USEWGET=""
# Allow the script to search for more generic imdb urls. This *may* lead to
# false positives, but should not really cause any grief/false lookups.
# Default is level 1 relaxation. 0 is *very* strict, 4 is most relaxed. If
# you choose any level beyond 1, I would like to recieve the nfo's which
# created false positives... So help me improve the routine and send the nfo's
# my way ;) The FAQ has more info regarding the different levels.
#RELAXEDURLS="1" # "" is the same as "1"
RELAXEDURLS="3" # "ON" is the same as "3"
++ RELAXEDURLS=3
# To prevent false positives, you should list dirs here which you expect will
# get movie-info. Please note that if you do not list any dirs, *all* nfo's
# will be scanned. This is the default.
# This list is case sensitive, so spell things correctly.
SCANDIRS="/site/XVID"
++ SCANDIRS=/site/XVID
#SCANDIRS="/site/DiVX /site/XViD /site/SVCD /site/VCD /site/MOViES /site/TV-RiPS /site/AFFILS"
# To support international sites, you can change the "us.imdb.com" into a valid
# url with info written in your language. For instance, to put "german.imdb.com"
# in channel and the .imdb, set this variable to "german". The default is "" which
# is equivalent to "us".
LOCALURL=""
++ LOCALURL=
#LOCALURL="swedish"
# When using post_check in glftpd.conf to start this script, it sometimes
# do not recieve any arguments passed from glftpd. There is a way around this
# but it should only be used if imdb lookups done on releases fail on uploads,
# but works when doing a rescan.
# I'm not sure how many is affected by this bug, so feedback is appreciated.
GLFIX=""
++ GLFIX=
#GLFIX="YES"
###########################################################################
### The following will affect output of the script. First the variables ###
### for the bot output. ###
# should the script write to glftpd.log (ie, bot support)? Use "" to
# disable.
USEBOT="YES"
++ USEBOT=YES
#USEBOT=""
# Trigger for bot. Most bots should be able to show the info with the UPDATE
# trigger. If you like to modify your bot for special purposes, edit to
# whatever catches your fancy/setup.
# Please BE SURE YOU KNOW WHAT YOU ARE DOING before changing this. Just putting
# it to something that catches the mood will prevent any output in the channel.
# pzs-ng uses IMDB as trigger - changed the default for this.
TRIGGER="IMDB:"
++ TRIGGER=IMDB:
#TRIGGER="IMDBVAR:"
# Same as above, only valid for !imdb output. Please take note that !imdb output
# is not as easy as general output - the UPDATE: trigger won't work unless you
# edit dZSbot.tcl a bit and add type() and path(). You either have to use the
# "full" mode, or edit dZSbot.tcl. You can read more about it in
# README.psxc-imdb-find.
# pzs-ng uses IMDBFIND - no need to change."
FINDTRIGGER="IMDBFIND:"
++ FINDTRIGGER=IMDBFIND:
#FINDTRIGGER="IMDFINDVAR:"
# Date format used by bot. Edit according to your OS (FBSD/Linux is default)
DATE=`date +"%a %b %d %H:%M:%S %Y"`
date +"%a %b %d %H:%M:%S %Y"
+++ date '+%a %b %d %H:%M:%S %Y'
++ DATE=Sun Feb 25 06:18:44 2007
# To prevent output in channel when movies are uploaded in private/affill/group-
# dirs, put the dirs here. Dirs are separated by a space."
BOTEXEMPT="/site/+Private"
++ BOTEXEMPT=/site/+Private
# The following wil output only ONE LINE OF INFO to the bot. This overrides the
# rest of the settings, except BOTHEAD. The line includes Title, Country, Genre,
# Rating and IMDb URL. Use "" for normal output.
# This setting is ignored if you are using the LOGFORMAT feature (below).
BOTONELINE=""
++ BOTONELINE=
#BOTONELINE="YES"
# Same as above, only valid for !imdb output.
FINDBOTONELINE=""
++ FINDBOTONELINE=
#FINDBOTONELINE="YES"
# This line will be written prior to whatever IMDB info found. Use "" to disable.
# Put RELEASENAME somewhere if you'd like to announce the name of the release.
# This setting is ignored if you are using the LOGFORMAT feature.
BOTHEAD="Releasename..: RELEASENAME"
++ BOTHEAD=Releasename..: RELEASENAME
#BOTHEAD="IMDb has some interesting facts on RELEASENAME"
#BOTHEAD="info on RELEASENAME from IMDb:"
#BOTHEAD=""
# Should the bot announce who is starring in the movie? Use "" to disable.
SHOWSTAR="YES"
++ SHOWSTAR=YES
#SHOWSTAR=""
# Should the short version of user comments be shown in channel? "" disables
SHOWCOMMENTSHORT="YES"
++ SHOWCOMMENTSHORT=YES
#SHOWCOMMENTSHORT=""
# Showing both Tagline and Plot Outline may be too much to your liking. This variable
# will show either Tagline or Plot Outline if either or both are found. Use "TAG" if
# you prefer Tagline over Plot Outline, "PLOT" if you prefer Plot Outline over Tagline,
# "NONE" to disable both, or "" to show both.
# This setting is ignored if you are using the LOGFORMAT feature (above).
#TAGPLOT="" # Show both
#TAGPLOT="TAG" # Show one, tag prefered
TAGPLOT="PLOT" # Show one, plot prefered
++ TAGPLOT=PLOT
#TAGPLOT="NONE" # Show none
# Logformat used. If you want to format the output yourself, this should help
# you do it. To disable, use "" (default).
# An example config to be used in dZSbot.tcl can be found in the README.
# Valid options are "" (empty), "SPECIAL" for a list of variables passed to the
# log, or "MYOWN" for your own formatted output (see below for more).
# For pzs-ng, I've changed the default to MYOWN.
LOGFORMAT="MYOWN"
++ LOGFORMAT=MYOWN
#LOGFORMAT="SPECIAL"
# The same as above, only used for !imdb lookups.
# For pzs-ng, I've changed the default to MYOWN.
FINDLOGFORMAT="MYOWN"
++ FINDLOGFORMAT=MYOWN
# The following variables is what the variable %islimited (and $ISLIMITED) in the
# extras scripts will be set to, depending on how many screens the movie has had on
# opening weekend. If screens is below 500, LIMITEDYES will be used. Else, LIMITEDNO
# will be used. If availible, the number of screens in US cinemas is the source.
# Please note that this variable is used by INFOFILENAME too (below).
LIMITEDYES="limited"
++ LIMITEDYES=limited
LIMITEDNO="not limited"
++ LIMITEDNO=not limited
# Maximum number of cast members listed. Global setting.
CASTNUM=5
++ CASTNUM=5
#CASTNUM=99
# Maximum number of countries listed. Global setting.
#COUNTRYNUM=2
COUNTRYNUM=99
++ COUNTRYNUM=99
# Maximum number of languages listed. Global setting.
#LANGUAGENUM=2
LANGUAGENUM=99
++ LANGUAGENUM=99
# Maximum number of certifications listed. Global setting.
#CERTIFICATIONNUM=2
CERTIFICATIONNUM=99
++ CERTIFICATIONNUM=99
# Maximum number of genres listed. Global setting.
#GENRENUM=2
GENRENUM=99
++ GENRENUM=99
# Maximum number of runtimes listed. Global setting.
#RUNTIMENUM=2
RUNTIMENUM=99
++ RUNTIMENUM=99
###############################################################################
### The next variables will affect output to a file in the release-dir. The ###
### idea here is to show this file when users enters the dir, thus removing ###
### the need to view the .nfo and looking up info on IMDb themselves. Check ###
### the README for more info. ###
# The file to write imdb info to in the movie dir. Use "" to disable.
DOTIMDB=".imdb"
++ DOTIMDB=.imdb
#DOTIMDB=""
# Someone requested a separate file for just the link, a <releasename>.imdb.url
# You can also get a <releasename>.imdb.html, which is imho better.
# Use "" to disable (default).
DOTURL=""
++ DOTURL=
#DOTURL="HTML"
#DOTURL="URL"
# Should user comment be shown in DOTIMDB? "" disables. This is in some cases a
# lot of info - feel your way on this one. Default is disabled.
#SHOWCOMMENT="YES"
SHOWCOMMENT=""
++ SHOWCOMMENT=
# Maximum width for text written to DOTIMDB. This controls how many chars wide the
# text should be before word-wrapping it.
IMDBWIDTH=77
++ IMDBWIDTH=77
# head and tail written to DOTIMDB. Take notice of IMDBWITH - this should not be
# wider than that. This output will be written as "echo -e" which means you can use
# control characters like \n, thus the head and tail can stretch over 1 or more lines.
IMDBHEAD="============================ PSXC IMDB INFO $VERSION ============================\n"
++ IMDBHEAD============================= PSXC IMDB INFO v2.7i ============================\n
IMDBTAIL="\n============================ PSXC IMDB INFO $VERSION ============================"
++ IMDBTAIL=\n============================ PSXC IMDB INFO v2.7i ============================
####################################################################################
### The following is a BETA feature, and has really nothing to do with IMDb info ###
### at all. It's a quick and dirty way to extract release dates from the .nfo ###
### files, and putting that info in a separate file. It works like the .imdb ###
### file (above) and is supposed to be listed on entering the dir. ###
# Use the beta date-extraction? Enter a name here, or "" to disable.
DOTDATE=".date"
++ DOTDATE=.date
#DOTDATE=""
####################################################################################
### External programs which will be passed the extracted variables. You may for ###
### instance have a better idea on how your .imdb should look like. This will ###
### give you the opportunity. ###
### See the included example-file for a quick-n-dirty example, or take a peek in ###
### the addons/ -dir - I'll try to add more addons when time permits. If you ###
### have an idea for an addon, don't hesitate to contact me, or make your own. ###
# Call up an external script? Enter full path, or "" to disable (default)
# Only uncomment one of the lines - if you wish to run more than one addon,
# you need to place the path/names of all the addons on the same line. An
# example is shown below using two addons.
#EXTERNALSCRIPTNAME=""
#EXTERNALSCRIPTNAME="$GLROOT/bin/psxc-symlink-maker.sh"
#EXTERNALSCRIPTNAME="$GLROOT/bin/psxc-imdb-nuker.sh"
#EXTERNALSCRIPTNAME="$GLROOT/bin/psxc-imdb-nuker.sh $GLROOT/bin/psxc-symlink-maker.sh"
EXTERNALSCRIPTNAME="$GLROOT/bin/psxc-imdb-dotimdb.pl"
++ EXTERNALSCRIPTNAME=/glftpd/bin/psxc-imdb-dotimdb.pl
####################################################################################
### You might wish to add a file/dir with IMDB info in the name. This is now ###
### possible. The next few variables describe this. ###
# If you wish, you can make a dir/file with info from the release in the dir/filename.
# Currently, the only things availible are user rating, votes, genres and runtime.
# To prevent the need for sticky bits on some bins, we will create a temporary
# file/dir. The name of this file is not important - we will rename it to INFOFILENAME
# (below) later. To disable this feature, set this variable to "".
#INFOTEMPNAME=""
INFOTEMPNAME=".imdbinfoname"
++ INFOTEMPNAME=.imdbinfoname
# Format the file as you wish. Use the following names to be substituted for the
# real info (case sensitive): VOTES SCORE GENRE RUNTIME YEAR ISLIMITED SCREENS
INFOFILENAME="[IMDB]=- Score SCORE - GENRE - (YEAR) -=[IMDB]"
++ INFOFILENAME=[IMDB]=- Score SCORE - GENRE - (YEAR) -=[IMDB]
# Would you like to create a dir or a file? Use "" for dir, "FILE" for file.
INFOFILEIS=""
++ INFOFILEIS=
#INFOFILEIS="FILE"
# For security and filesystem reasons we will change some chars to harmless ones.
# This variable describe the valid chars to use. I suggest you leave this as is,
# unless you know what you're doing. 'man tr' should give some indication.
# If you wish to allow spaces in your file/dirname, use the second line.
#INFOVALID="[:alnum:])(.\-=][\n"
INFOVALID="[:alnum:][:space:])(.\-=][\n"
++ INFOVALID=[:alnum:][:space:])(.\-=][\n
# Put here the char you wish invalid chars to be changed into.
INFOCHARTO="_"
++ INFOCHARTO=_
# Maximum number of genres that should show. This would prevent the dir/file that
# is created from getting to be too long...
INFOGENREMAX=2
++ INFOGENREMAX=2
#INFOGENREMAX=5
# Separator between genres. Usually this is "/", but that can't be used in a dir/
# filename for obvious reasons.
INFOGENRESEP="-"
++ INFOGENRESEP=-
##############
# PRE CONFIG ####################################################################
# ###
# The following is the config for the pre-support. You only need to edit if ###
# you plan on using it. ###
# This is a tricky one to understand. If you run psxc-imdb-pre.sh from the
# prescript you are using, or if whatever calls psxc-imdb-pre.sh is chrooted
# under GLROOT, you must set this variable to "". If not (and this is the
# majority of cases in my experience) you set this to "$GLROOT".
# Normally, you don't change this.
GLPREROOT=$GLROOT
++ GLPREROOT=/glftpd
#GLPREROOT=""
# Path variable. All commands should be within glftpd's bin directory. No need
# to change.
GLPATHPRE=$GLPREROOT/bin
++ GLPATHPRE=/glftpd/bin
# Name of what psxc-imdb.sh is named when run in pre-mode. This variable may
# be removed later, though for now you gotta make the symlink needed. See
# README for info.
PRENAME=psxc-imdb-pre.sh
++ PRENAME=psxc-imdb-pre.sh
# Path to the logfile to read. This normally is glftpd.log, but can be a
# separate file if your prescript logs elsewhere. Please see PRETRIGGER and
# WORD as well.
GLPRELOG=$GLPREROOT/ftp-data/logs/glftpd.log
++ GLPRELOG=/glftpd/ftp-data/logs/glftpd.log
#GLPRELOG=$GLPREROOT/ftp-data/logs/prelog
# Trigger your prescript uses. If you use a separate logfile which do not have
# a trigger (like a prelog or something) set this to "".
PRETRIGGER="PRE:"
++ PRETRIGGER=PRE:
#PRETRIGGER="DONE:"
#PRETRIGGER=""
# This is a wordcount read after PRETRIGGER where the path is located. Imagine
# the following as something found in glftpd.log:
#
# Sat Apr 19 06:46:26 2003 PRE: "/site/divx/somedir" "pregroup" "some text"
#
# If PRETRIGGER is "PRE:" then you'd want to set WORDS to "1", as this is the
# location of the path. If PRETRIGGER is "" then you'd set WORDS to "7", as it
# is the 7th word in the line. Please note that text within '"' is counted as
# one word, ie, there're 9 words in my example, not 10.
#
# To support f00-pre and others, you can now enter more than one number,
# separated by a space. With SEPARATOR set to "/" (see below), setting WORDS to
# "4 3" with the following in glftpd.log:
#
# Sat Apr 19 06:46:26 2003 PRE: "user" "group" "some.release" "/site/section"
#
# will give "/site/section/some.release" as the path.
WORDS="1"
++ WORDS=1
#WORDS="8 3"
#WORDS=7
# use this separator between the words grabbed in WORDS. Use "" to disable.
SEPARATOR="/"
++ SEPARATOR=/
#SEPARATOR=""
######################
# FORMATTING OPTIONS ############################################################
# ###
# The following is options that will let you be able to format the bot-output ###
# yourself. They will only be used if LOGFORMAT or FINDLOGFORMAT is set to ###
# "MYOWN". ###
# The following strings will be replaced with the actual data gathered:
# %imdbdirname %imdburl %imdbtitle %imdbgenre %imdbrating %imdbcountry
# %imdblanguage %imdbcertification %imdbruntime %imdbdirector
# %imdbbusinessdata %imdbpremiereinfo %imdblimitedinfo %imdbvotes %imdbscore
# %imdbname %imdbyear %imdbnumscreens %imdbislimited %imdbcastleadname
# %imdbcastleadchar %imdbtagline %imdbplot %imdbbar %imdbcasting
# %imdbcommentshort %newline %bold
#
# What these strings represents is found in 'README.use.of.special.format'.
MYOWNFORMAT="%boldIMDB:%bold %bold%imdbname%bold (%imdburl ), a %imdbdirector movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in %imdbpremiereinfo, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot"
++ MYOWNFORMAT=%boldIMDB:%bold %bold%imdbname%bold (%imdburl ), a %imdbdirector movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in %imdbpremiereinfo, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot
FINDMYOWNFORMAT="%boldIMDB:%bold %bold%imdbname%bold (%imdburl) starring %imdbcasting.%newline%boldIMDB:%bold Score: %bold%imdbscore%bold - Screens: %imdbnumscreens in %imdbpremiereinfo, and is thus %bold%imdbislimited%bold.%newline%boldIMDB:%bold Comment: %imdbcommentshort."
++ FINDMYOWNFORMAT=%boldIMDB:%bold %bold%imdbname%bold (%imdburl) starring %imdbcasting.%newline%boldIMDB:%bold Score: %bold%imdbscore%bold - Screens: %imdbnumscreens in %imdbpremiereinfo, and is thus %bold%imdbislimited%bold.%newline%boldIMDB:%bold Comment: %imdbcommentshort.
# You may replace empty strings with something.
MYOWNEMPTY="N/A"
++ MYOWNEMPTY=N/A
FINDMYOWNEMPTY="N/A"
++ FINDMYOWNEMPTY=N/A
# To get multiple lines in the format, we use a specified char as delimeter.
# This char should not appear elsewhere in your output.
# Also remember to set this char in your bot, or, if you use the "FULL" mode
# make sure it's the same char as the variable psxc(NEWLINE) in
# psxc-imdb-conf.tcl
# This char will be replaced with the string %newline (above)
# NOTE:
# If you use \n as splitter char in the bot, you need to set NEWLINE here
# to "\\\\n".
#NEWLINE="\\\\n"
NEWLINE="|"
++ NEWLINE=|
###############
# OTHER STUFF ###################################################################
# ###
# If you really, *REALLY* need to run imdb scan at the same time the nfo is
# uploaded, set this variable to "YES". People uploading nfo's will notice
# this - their upload queue will freeze while imdb info is looked up. In some
# cases, people will actually loose connection while this is done... so, please,
# consider carefully before changing this.
# This will only work if you run everything chrooted.
# The default is to have this variable disabled "".
RUNCONTINOUS=""
++ RUNCONTINOUS=
#RUNCONTINOUS="YES"
# END OF CONFIG
####################################################################################
+ '[' 0 -ne 0 ']'
# Start debugging
if [ "$DEBUG" = "ON" ] || [ "$DEBUG" = "2" ]; then
set -x
elif [ "$DEBUG" = "3" ]; then
set -x -v
elif [ "$DEBUG" = "4" ]; then
set -x -v
fi
+ '[' '' = ON ']'
+ '[' '' = 2 ']'
+ '[' '' = 3 ']'
+ '[' '' = 4 ']'
# Let's hack glftpd
if [ -z "$RECVDARGS" ] && [ ! -z "$GLFIX" ]; then
RECVDARGS=`ls -1Ft | grep -a -v "/" | grep -a -v "@" | head -n 1 | grep -a -e "[.][nN][fF][oO]$"`
fi
+ '[' -z '' ']'
+ '[' '!' -z '' ']'
# Remove locale settings which might cause problems
export LC_ALL=en_US
+ export LC_ALL=en_US
+ LC_ALL=en_US
if [ ! -z "$RECVDARGS" ]; then
# This is what is run under zs-c, chrooted.
###########################################
# PATH=$PATHCHROOTED
# IMDBLOG=$IMDBLOGCHROOTED
FILENAME="$RECVDARGS"
case $FILENAME in
*.[nN][fF][oO])
if [ ! -z "$GLROOT" ]; then
MYTMPFILE=`echo "$TMPFILE" | sed "s%$GLROOT%%"`
else
MYTMPFILE=$TMPFILE
fi
PSXCFLAG=`head -n 1 $MYTMPFILE | tr -cd '0-9'`
if [ ! -z "$PSXCFLAG" ]; then
if [ $PSXCFLAG -ge 4 ]; then
let PSXCFLAG=PSXCFLAG-4
fi
if [ $PSXCFLAG -ge 2 ]; then
DOTIMDB=""
INFOTEMPNAME=""
DOTDATE=""
DOTURL=""
fi
fi
if [ ! -z "$DOTDATE" ]; then
DOTDATEINFO="`grep -a [Dd][Aa][Tt][Ee] $FILENAME | tr -c '/a-zA-Z0-9:. -/\n' ' ' | tr -s ' '`"
if [ ! -z "$DOTDATEINFO" ]; then
echo "$DOTDATEINFO" > $DOTDATE
chmod 666 $DOTDATE
fi
fi
# Should we even begin searching for an url?
SEARCHFORURLS=0
if [ -z "$SCANDIRS" ]; then
SEARCHFORURLS=1
fi
for SCANDIR in $SCANDIRS; do
if [ ! -z "`pwd | grep -a "$SCANDIR"`" ]; then
SEARCHFORURLS=1
break
fi
done
if [ $SEARCHFORURLS -eq 0 ]; then
exit 0
fi
# First, replace some old variable values
if [ -z "$RELAXEDURLS" ]; then
RELAXEDURLS=1
fi
if [ "$RELAXEDURLS" = "ON" ]; then
RELAXEDURLS=3
fi
# Level 0 search
IMDBURLS="`grep -a [Ii][Mm][Dd][Bb] $FILENAME | tr ' \|' '\n' | sed -n /[hH][tT][tT][pP]:[/][/].*[.][iI][mM][dD][bB][.].*.[0-9]/p | head -n 1 | tr -c -d '[:alnum:]\:./?'`"
if [ ! -z "`echo $IMDBURLS | grep -a "imdb\."`" ]; then
IMDBURL="http://former.imdb.com/title/tt""`echo $IMDBURLS | sed "s/=/-/g" | sed "s/imdb./=/" | cut -d "=" -f 2 | cut -d "/" -f 2,3 | tr -c -d '[:digit:]'`"
if [ -z `echo $IMDBURL | tr -cd '0-9'` ]; then
IMDBURL=""
fi
fi
# Level 1 search
if [ -z "$IMDBURL" ] && [ $RELAXEDURLS -ge 1 ]; then
IMDBURLS="`grep -a [Ii][Mm][Dd][Bb] $FILENAME | tr ' \|' '\n' | sed -n /[hH][tT][tT][pP]:[/][/].*[iI][mM][dD][bB][.].*.[0-9]/p | head -n 1 | tr -c -d '[:alnum:]\:./?'`"
if [ ! -z "`echo $IMDBURLS | grep -a "imdb\."`" ]; then
IMDBURL="http://former.imdb.com/title/tt""`echo $IMDBURLS | sed "s/=/-/g" | sed "s/imdb./=/" | cut -d "=" -f 2 | cut -d "/" -f 2,3 | tr -c -d '[:digit:]'`"
if [ -z `echo $IMDBURL | tr -cd '0-9'` ]; then
IMDBURL=""
fi
fi
fi
# Level 2 search
if [ -z "$IMDBURL" ] && [ $RELAXEDURLS -ge 2 ]; then
IMDBURLS="`grep -a [Ii][Mm][Dd][Bb] $FILENAME | tr ' \|' '\n' | sed -n /.*[iI][mM][dD][bB][.].*.[0-9]/p | head -n 1 | tr -c -d '[:alnum:]\:./?'`"
if [ ! -z "`echo $IMDBURLS | grep -a "imdb\."`" ]; then
IMDBURL="http://former.imdb.com/title/tt""`echo $IMDBURLS | sed "s/=/-/g" | sed "s/imdb./=/" | cut -d "=" -f 2 | cut -d "/" -f 2,3 | tr -c -d '[:digit:]'`"
if [ -z `echo $IMDBURL | tr -cd '0-9'` ]; then
IMDBURL=""
fi
fi
fi
# Level 3 search
if [ -z "$IMDBURL" ] && [ $RELAXEDURLS -ge 3 ]; then
for IMDBURLS in `grep -a [Ii][Mm][Dd][Bb] $FILENAME | tr -c '[:digit:]' '\n' | grep -a -v "^$"`; do
if [ ! -z `echo $IMDBURLS | tr -cd '0-9'` ]; then
if [ `echo $IMDBURLS | tr -cd '0-9' | wc -c` -eq 8 ] || [ `echo $IMDBURLS | tr -cd '0-9' | wc -c` -eq 7 ]; then
IMDBURL="$IMDBURLS"
break
fi
fi
done
if [ ! -z "$IMDBURL" ]; then
IMDBURL="http://former.imdb.com/title/tt""$IMDBURL"
fi
fi
# Level 4 search
if [ -z "$IMDBURL" ] && [ $RELAXEDURLS -ge 4 ]; then
for IMDBURLS in `cat $FILENAME | tr -c '[:digit:]' '\n' | grep -a -v "^$"`; do
if [ `echo $IMDBURLS | wc -c` -eq 8 ] || [ `echo $IMDBURLS | wc -c` -eq 7 ]; then
IMDBURL="$IMDBURLS"
break
fi
done
if [ ! -z "$IMDBURL" ]; then
IMDBURL="http://former.imdb.com/title/tt""$IMDBURL"
fi
fi
# export what we've found
if [ ! -z "$IMDBURL" ]; then
echo "$IMDBURL""|""$PWD" >> $IMDBLOGCHROOTED
if [ ! -z "$DOTIMDB" ]; then
if [ ! -e "$DOTIMDB" ] || [ -w "$DOTIMDB" ]; then
echo -n "" > $DOTIMDB
chmod 666 $DOTIMDB
fi
fi
if [ ! -z "$DOTURL" ]; then
DOTURLF="`basename "$PWD" | sed "s/ /./g"`"
if [ ! "$DOTURL" = "URL" ]; then
DOTURLF="$DOTURLF"".imdb.html"
if [ ! -e "$DOTURLF" ] || [ -w "$DOTURLF" ]; then
echo "<TITLE>IMDB REDIRECT</TITLE>" > $DOTURLF
echo "<META HTTP-EQUIV=\"refresh\" CONTENT=\"0;URL=$IMDBURL\">" >> $DOTURLF
chmod 666 $DOTURLF
fi
else
DOTURLF="$DOTURLF"".imdb.url"
if [ ! -e "$DOTURLF" ] || [ -w "$DOTURLF" ]; then
echo "[InternetShortcut]" > $DOTURLF
echo "URL=""$IMDBURL" >> $DOTURLF
chmod 666 $DOTURLF
fi
fi
fi
if [ ! -z "$INFOTEMPNAME" ]; then
if [ ! -e "$INFOTEMPNAME" ] || [ -w "$INFOTEMPNAME" ]; then
if [ ! -z "$INFOFILEIS" ]; then
echo -n "" > $INFOTEMPNAME
chmod 666 $INFOTEMPNAME
else
mkdir -p $INFOTEMPNAME
chmod 777 $INFOTEMPNAME
fi
fi
fi
fi
touch -acmr "$FILENAME" `pwd` >/dev/null 2>&1
;;
esac
# exit 0
#else
fi
+ '[' '!' -z '' ']'
if [ ! -z "$RUNCONTINOUS" ] || [ -z "$RECVDARGS" ]; then
# run major part.
if [ "`basename "$0"`" = "$PRENAME" ]; then
# This is what is done with pre's
#################################
PATH=$GLPATHPRE
a="`tail -n 5 $GLPRELOG | grep -a "$PRETRIGGER" | tail -n 1`"
DIRNAME=""
for WORD in $WORDS; do
count=0
combine=0
if [ -z "$a" ]; then
exit 0
fi
if [ ! -z "$PRETRIGGER" ]; then
let WORD=WORD+1
fi
for b in $a; do
if [ -z `echo $b | grep -a "$PRETRIGGER"` ] && [ $count -gt 0 ] || [ -z "$PRETRIGGER" ]; then
if [ $combine -eq 1 ]; then
c=$c$b
else
c=$b
fi
if [ ! -z `echo "$c" | grep -a "^\""` ]; then
combine=1
else
c=$b
let count=count+1
fi
if [ ! -z `echo "$c" | grep -a "\"$"` ]; then
combine=0
let count=count+1
fi
if [ $count -eq $WORD ]; then
break
fi
else
if [ "$b" = "$PRETRIGGER" ]; then
count=1
fi
fi
done
DIRNAME="$DIRNAME""$c"
done
DIRNAME=`echo $DIRNAME | sed "s|\"\"|$SEPARATOR|g" | sed "s|\"||g"`
if [ -d $GLROOT$DIRNAME ]; then
FILENAME=`ls -1 $GLROOT$DIRNAME | grep -a "\.[Nn][Ff][Oo]$" | head -n 1`
IMDBURL="`grep -a [Ii][Mm][Dd][Bb] $GLROOT$DIRNAME/$FILENAME | tr ' ' '\n' | sed -n /[hH][tT][tT][pP]:[/][/].*[.][iI][mM][dD][bB].*.[0-9]/p | head -n 1 | tr -c -d '[:alnum:]\:./?'`"
if [ ! -z "`echo $IMDBURL | grep -a "\.imdb\."`" ]; then
IMDBURL="http://former.imdb.com/title/tt""`echo $IMDBURL | sed "s/=/-/g" | sed "s/.imdb./=/" | cut -d "=" -f 2 | cut -d "/" -f 2,3 | tr -c -d '[:digit:]'`"
fi
if [ ! -z "$IMDBURL" ]; then
a="`tail -n 5 $GLLOG | grep -a "$TRIGGER" | grep -a "$DIRNAME" | tail -n 1`"
if [ -z "$a" ]; then
SEARCHFORURLS=0
if [ -z "$SCANDIRS" ]; then
SEARCHFORURLS=1
fi
for SCANDIR in $SCANDIRS; do
if [ ! -z "`echo "$DIRNAME" | grep -a "$SCANDIR"`" ]; then
SEARCHFORURLS=1
break
fi
done
if [ ! $SEARCHFORURLS -eq 0 ]; then
echo "$IMDBURL""|""$DIRNAME" >> $IMDBLOG
fi
fi
fi
fi
if [ -z "$RUNCONTINOUS" ]; then
exit 0
fi
fi
if [ ! -e $IMDBLOG ]; then
# Check to see if it's a first-run
##################################
echo "Please read the docs before trying to run this script."
exit 0
fi
# The main part.
################
if [ -z "`cat $IMDBLOG`" ]; then
# No new imdb-info. let's quit.
###############################
exit 0
fi
# Make sure this script isn't already running.
##############################################
sleep 0.$RANDOM
MYNAMEIS=`basename "$0"`
IMDBPIDCONTENT=`cat $IMDBPID`
if [ ! -z "$IMDBPIDCONTENT" ]; then
if [ ! -z `ps ax | awk '{print $1}' | grep -a -e "^$IMDBPIDCONTENT$"` ]; then
exit 0
fi
fi
echo $$ > $IMDBPID
# Seems like something was put into the log. Let's check it.
############################################################
IMDBFLAGS=`head -n 1 $TMPFILE | tr -cd '0-9'`
if [ ! -z "$IMDBFLAGS" ]; then
if [ $IMDBFLAGS -ge 4 ]; then
EXTERNALSCRIPTNAME=""
let IMDBFLAGS=IMDBFLAGS-4
fi
if [ $IMDBFLAGS -ge 2 ]; then
DOTIMDB=""
INFOTEMPNAME=""
let IMDBFLAGS=IMDBFLAGS-2
fi
if [ $IMDBFLAGS -ge 1 ]; then
USEBOT=""
fi
fi
if [ -z "$LANGUAGENUM" ] || [ $LANGUAGENUM -eq 0 ]; then
LANGUAGENUM=99
fi
if [ -z "$COUNTRYNUM" ] || [ $COUNTRYNUM -eq 0 ]; then
COUNTRYNUM=99
fi
if [ -z "$CERTIFICATIONNUM" ] || [ $CERTIFICATIONNUM -eq 0 ]; then
CERTIFICATIONNUM=99
fi
if [ -z "$CASTNUM" ] || [ $CASTNUM -eq 0 ]; then
CASTNUM=99
fi
if [ -z "$GENRENUM" ] || [ $GENRENUM -eq 0 ]; then
GENRENUM=99
fi
if [ -z "$RUNTIMENUM" ] || [ $RUNTIMENUM -eq 0 ]; then
RUNTIMENUM=99
fi
while [ ! -z "`cat $IMDBLOG`" ]; do
IMDBLINE="`cat $IMDBLOG | grep -a -e "/" | head -n 1`"
cat $IMDBLOG | grep -a -F -v "$IMDBLINE" > $TMPFILE
cat $TMPFILE > $IMDBLOG
ISLIMITED=""
BUSINESS=""
BUSINESSSHORT=""
PREMIERE=""
LIMITED=""
EXEMPTED=""
LYNXTRIESORIG=$LYNXTRIES
IMDBURL="`echo $IMDBLINE | cut -d "|" -f 1`"
IMDBLNK="`echo $IMDBLINE | cut -d "|" -f 2`"
IMDBDST="`echo $IMDBLINE | cut -d "|" -f 3`"
DEBUGCOUNT=1
if [ ! -z $DEBUG ]; then
echo "$DEBUGCOUNT : DOTIMDB = '$DOTIMDB'"
echo "$DEBUGCOUNT : USEBOT = '$USEBOT'"
fi
if [ -d "$GLROOT$IMDBLNK" ]; then
IMDBDIR="`basename "$IMDBLNK"`"
BASELNK="`dirname "$IMDBLNK"`"
IMDBLKL="$IMDBLNK"
IMDBLNK="$GLROOT$IMDBLKL/$DOTIMDB"
elif [ "$IMDBLNK" = "/dev/null" ]; then
IMDBLKL="$IMDBLNK"
DOTIMDB=""
EXTERNALSCRIPTNAME=""
INFOTEMPNAME=""
BOTONELINE=$FINDBOTONELINE
TRIGGER="$FINDTRIGGER"
LOGFORMAT="$FINDLOGFORMAT"
MYOWNFORMAT="$FINDMYOWNFORMAT"
MYOWNEMPTY="$FINDMYOWNEMPTY"
if [ ! -z "$PSXCFINDLOG" ] && [ -w $PSXCFINDLOG ]; then
GLLOG=$PSXCFINDLOG
fi
else
DOTIMDB=""
USEBOT=""
EXTERNALSCRIPTNAME=""
INFOTEMPNAME=""
fi
DEBUGCOUNT=2
if [ ! -z $DEBUG ]; then
echo "$DEBUGCOUNT : DOTIMDB = '$DOTIMDB'"
echo "$DEBUGCOUNT : USEBOT = '$USEBOT'"
fi
for EXEMPT in $BOTEXEMPT; do
if [ ! -z `echo "$IMDBLKL" | grep -a "$EXEMPT"` ]; then
USEBOT=""
EXEMPTED="ON"
fi
done
if [ ! -z "$LOGFORMAT" ]; then
BOTONELINE="YES"
TAGPLOT=""
BOTHEAD=""
fi
DEBUGCOUNT=3
if [ ! -z $DEBUG ]; then
echo "$DEBUGCOUNT : DOTIMDB = '$DOTIMDB'"
echo "$DEBUGCOUNT : USEBOT = '$USEBOT'"
fi
if [ ! -z `cat $IMDBURLLOG | grep -a "$IMDBURL"` ] || [ ! -z $EXEMPTED ]; then
if [ ! "$IMDBLKL" = "/dev/null" ]; then
USEBOT=""
fi
else
if [ ! "$IMDBLKL" = "/dev/null" ]; then
echo "$IMDBURL" >> $IMDBURLLOG
tail -n $KEEPURLS $IMDBURLLOG > $TMPFILE
cat $TMPFILE > $IMDBURLLOG
echo -n "" > $TMPFILE
fi
fi
DEBUGCOUNT=4
if [ ! -z $DEBUG ]; then
echo "$DEBUGCOUNT : DOTIMDB = '$DOTIMDB'"
echo "$DEBUGCOUNT : USEBOT = '$USEBOT'"
fi
# grab info from web
####################
OUTPUTTRIES=1
OUTPUTOK=""
while [ -z "$OUTPUTOK" ]; do
while [ $OUTPUTTRIES -le $LYNXTRIESORIG ]; do
let OUTPUTTRIES=OUTPUTTRIES+1
OUTPUTOK="OK"
while [ $LYNXTRIES -gt 0 ]; do
if [ -z "$USEWGET" ]; then
lynx $LYNXFLAGS $IMDBURL > $TMPFILE 2>&1
if [ $? = "0" ]; then
LYNXTRIES=$LYNXTRIESORIG
break
else
let LYNXTRIES=LYNXTRIES-1
sleep 1
fi
else
#http_proxy=192.168.0.1:8080
wget -U "Internet Explorer" -O $TMPFILE --timeout=30 $IMDBURL >/dev/null 2>&1
if [ $? = "0" ] || [ -z "`cat $TMPFILE`" ]; then
LYNXTRIES=$LYNXTRIESORIG
HTMLPAGE="`lynx $LYNXFLAGS -force_html $TMPFILE`"
echo "$HTMLPAGE" > $TMPFILE
break
else
let LYNXTRIES=LYNXTRIES-1
echo -n "" > $TMPFILE
sleep 1
fi
fi
done
if [ $LYNXTRIES -ne $LYNXTRIESORIG ]; then
exit 0
fi
# Check for a movie-title. This *must* be present, else the script will just exit.
##################################################################################
TITLE=`cat "$TMPFILE" | grep -a -e "^[a-zA-Z0-9\"\.]" | sed "s/\"//g" | tail -n 1`
if [ -z "$TITLE" ]; then
# a new version of lynx? let's try a diff. approach.
TITLE=`cat "$TMPFILE" | grep -a -e "([12][089][0-9][0-9])" | head -n 1 | sed "s/PageFlicker//" | sed "s/\"//g"`
fi
if [ -z "$TITLE" ] || [ ! -z "`echo "$TITLE" | grep -a -e "with other users on IMDb"`" ] || [ ! -z "`echo "$TITLE" | grep -a -e "laserdisc details"`" ] || [ ! -z "`echo "$TITLE" | grep -a -e "(\ )"`" ] || [ ! -z "`echo "$TITLE" | grep -a -e "\.\.\.\."`" ]; then
OUTPUTOK=""
break
fi
# Grab hold of the info we'll use later. Also do some formatting.
#################################################################
TITLEYEAR=`echo $TITLE | tr ' ' '\n' | grep -a -v "^[a-zA-Z]" | grep -a -e "^([12]" | head -n 1`
TITLENAME=`echo $TITLE | sed "s| $TITLEYEAR||"`
TITLEYEAR=`echo $TITLEYEAR | tr -cd '0-9'`
if [ -z "$TITLEYEAR" ]; then
OUTPUTOK=""
break
fi
GENRE=`cat $TMPFILE | grep -a -e "Genre:" | sed "s/(more)//" | sed "s/^\ *//g" | sed "s/\ *$//g" | sed "s/Genre:/Genre........:/" | sed s/\"/$QUOTECHAR/g | tr '/' '\n' | head -n $GENRENUM | tr '\n' '/' | sed "s|/$||" | sed "s/ *$//"`
GENRECLEAN=`echo $GENRE | sed "s/Genre........: *//"`
RATING=`cat $TMPFILE | grep -a -e "User\ Rating:" | sed "s/^\ *//g" | sed "s/\ *$//g" | sed "s/ [Vv][Oo][Tt][Ee] [Hh][Ee][Rr][Ee]//" | sed "s/User Rating:/User Rating..:/" | sed "s/* //g" | sed "s/_ //g" | sed s/\"/$QUOTECHAR/g | head -n 1`
RATINGCLEAN=`echo $RATING | sed "s/User Rating..: *//"`
RATINGBAR="`cat $TMPFILE | grep -a -e "User\ Rating:" | tr -cd '\*_' | tr '\*_' '#-' | head -n 1`"
if [ "`echo $RATINGCLEAN | grep -a -e "[Ww][Aa][Ii][Tt]"`" = "" ]; then
RATINGVOTES=`echo $RATINGCLEAN | sed "s/ [Vv][Oo][Tt][Ee][Ss]//" | tr '() ' '\n' | grep -a -v "/" | grep -a -e "[0-9]" | head -n 1`
RATINGSCORE=`echo $RATINGCLEAN | grep -a -e "/" | tr '/' '\n' | head -n 1`
else
RATINGVOTES=""
RATINGSCORE=""
fi
COUNTRY=`cat $TMPFILE | grep -a -e "Country:" | sed "s/^\ *//g" | sed "s/\ *$//g" | sed "s/Country:/Country......:/" | sed s/\"/$QUOTECHAR/g | tr '/' '\n' | head -n $COUNTRYNUM | tr '\n' '/' | sed "s|/$||" | sed "s/ *$//"`
COUNTRYCLEAN=`echo $COUNTRY | sed "s/Country......: *//"`
TAGLINE=`cat $TMPFILE | grep -a -e "Tagline:" | sed "s/(more)//" | sed "s/^\ *//g" | sed "s/\ *$//g" | sed "s/([Mm][Oo][Rr][Ee])//" | sed "s/Tagline:/Tagline......:/" | sed s/\"/$QUOTECHAR/g | head -n 1`
TAGLINECLEAN=`echo $TAGLINE | sed "s/Tagline......: *//"`
LANGUAGE=`cat $TMPFILE | grep -a -e "Language:" | sed "s/^\ *//g" | sed "s/\ *$//g" | sed "s/Language:/Language.....:/" | sed s/\"/$QUOTECHAR/g | tr '/' '\n' | head -n $LANGUAGENUM | tr '\n' '/' | sed "s|/$||" | sed "s/ *$//"`
LANGUAGECLEAN=`echo $LANGUAGE | sed "s/Language.....: *//"`
PLOT=`cat $TMPFILE | grep -a -e "Plot\ [OS][u][tm][lm][ia][nr][ey]:" | sed "s/^\ *//g" | sed "s/\ *$//g" | sed "s/([Vv][Ii][Ee][Ww] [Tt][Rr][Aa][Ii][Ll][Ee][Rr])//" | sed "s/([Mm][Oo][Rr][Ee])//" | sed "s/Plot [OS][u][tm][lm][ia][nr][ey][:]/Plot Outline.:/" | sed s/\"/$QUOTECHAR/g | tr -s ' ' | head -n 1`
PLOTCLEAN=`echo $PLOT | sed "s/Plot Outline.: *//"`
if [ ! -z "`echo "$PLOTCLEAN" | grep -a -e "\(\ \)\ \(\ \)"`" ]; then
OUTPUTOK=""
break
fi
CERT=`cat $TMPFILE | grep -a -e "Certification:" | sed "s/^\ *//g" | sed "s/\ *$//g" | sed s/\"/$QUOTECHAR/g | tr '/' '\n' | head -n $CERTIFICATIONNUM | sed "s/(.*//g" | tr '\n' '/' | sed "s|/$||" | sed "s/ *$//"`
CERTCLEAN=`echo $CERT | sed "s/Certification: *//" | tr '/' '\n' | grep -a -e "[uU][sS][aA]" | tr -d ' ' | head -n 1`
CAST=`cat $TMPFILE | grep -a -e "\ \.\.\.\.\ " | sed s/\"/$QUOTECHAR/g | sed "s|\ \[.*\]||g" | head -n $CASTNUM`
CASTCLEAN=`echo "$CAST" | sed "s/\.\.\.\..*/|/g" | tr '\n' ' ' | tr -s ' ' | sed "s/^\ *//g" | sed "s/\ *$//g" | sed "s/ |/\,/g" | sed "s/,$//"`
CASTLEADNAME="`echo "$CAST" | head -n 1 | tr '.' '\n' | sed -e /^$/d | head -n 1 | tr -s ' ' | sed "s/^\ //g" | sed "s/\ $//g"`"
CASTLEADCHAR="`echo "$CAST" | head -n 1 | tr '.' '\n' | sed -e /^$/d | tail -n 1 | tr -s ' ' | sed "s/^\ //g" | sed "s/\ $//g"`"
COMMENTSHORT=`cat $TMPFILE | grep -a -e "User Comments:" | head -n 1 | sed "s/^\ *//g" | sed "s/\ *$//g" | sed "s/([Mm][Oo][Rr][Ee])//" | sed s/\"/$QUOTECHAR/g`
COMMENTSHORTCLEAN=`echo $COMMENTSHORT | sed "s/User Comments: *//"`
COMMENT=`cat $TMPFILE | awk '/User Comments:$/, /Check for other user comments.$/' | sed s/\"/$QUOTECHAR/g`
COMMENTCLEAN=`echo "$COMMENT" | grep -a -e "^\ \ \ \ \ " | sed "s/^\ *//g" | sed "s/\ *$//g" | sed s/\{\}\"/$QUOTECHAR/g | tr '\n' '|'`
RUNTIME=`cat $TMPFILE | grep -a -e "Runtime:" | sed "s/^\ *//g" | sed "s/\ *$//g" | sed "s/Runtime:/Runtime......:/" | sed s/\"/$QUOTECHAR/g | tr '/' '\n' | head -n $RUNTIMENUM | tr '\n' '/' | sed "s|/$||" | sed "s/ *$//"`
RUNTIMECLEAN="`echo $RUNTIME | sed "s/Runtime......: *//" | tr '/ ' '\n' | sed -e /^$/d | head -n 1 | tr -c -d '[:digit:]'`"
if [ ! -z "$RUNTIMECLEAN" ]; then
RUNTIMECLEAN="$RUNTIMECLEAN min"
fi
DIRECTOR=`cat $TMPFILE | awk '/Directed by$/, /Writing credits$/' | grep -a -v "Directed by" | grep -a -v "Writing Credits" | sed "s/^\ *//g" | sed "s/\ *$//g" | head -n 1 | sed s/\"/$QUOTECHAR/g`
DIRECTORCLEAN=`echo $DIRECTOR`
if [ ! -z "`echo "$DIRECTOR" | grep -a -e "\(\ \)\ \(\ \)"`" ]; then
OUTPUTOK=""
break
fi
ONELINE="`echo "$BOLD$TITLE$BOLD""[$COUNTRY]: $GENRE - $BOLD$RATING$BOLD"" - $IMDBURL" | sed "s/Genre........: //" | sed "s/User Rating..: //" | sed "s/Country......: *//" | tr -s ' '`"
if [ ! -z "`echo "$ONELINE" | grep -a -e "\(\ \)\ \(\ \)"`" ]; then
OUTPUTOK=""
break
fi
if [ ! -z "`echo "$GENRECLEAN" | grep -a -e "with other users on IMDb"`" ] || [ ! -z "`echo "$GENRECLEAN" | grep -a -e "laserdisc details"`" ] || [ ! -z "`echo "$GENRECLEAN" | grep -a -e "(\ )"`" ] || [ ! -z "`echo "$GENRECLEAN" | grep -a -e "\.\.\."`" ] || [ ! -z "`echo "$GENRECLEAN" | grep -a -e "Binary"`" ]; then
OUTPUTOK=""
break
fi
if [ ! -z "$OUTPUTOK" ]; then
OUTPUTTRIES=$LYNXTRIESORIG
break
fi
done
if [ $OUTPUTTRIES -gt $LYNXTRIESORIG ]; then
break
fi
done
if [ -z "$OUTPUTOK" ]; then
DOTIMDB=""
USEBOT=""
if [ ! -z "`echo $IMDBLKL | grep -a -e "/dev/null"`" ]; then
if [ -z "$LOGFORMAT" ]; then
echo "$DATE $TRIGGER \"$IMDBLKL\" \"Failed to fetch iMDB details. Please try again.\" \"$IMDBDST\"" >> $GLLOG
elif [ "$LOGFORMAT" = "MYOWN" ]; then
echo "$DATE $TRIGGER \"$IMDBLKL\" \"Failed to fetch iMDB details. Please try again.\" \"$IMDBDST\"" >> $GLLOG
else
echo "$DATE $TRIGGER \"$IMDBLKL\" \"\" \"Failed to fetch iMDB details. Please try again.\"" >> $GLLOG
fi
fi
else
# We won't check business and release as closely right away... may do so later
##############################################################################
BUSINESSURL="$IMDBURL""/business"
RELEASEURL="$IMDBURL""/releaseinfo"
if [ -z "`cat $TMPFILE | grep -a -F "$BUSINESSURL"`" ] && [ -z "$USEWGET" ]; then
USEBUSINESS=""
fi
if [ -z "`cat $TMPFILE | grep -a -F "$RELEASEURL"`" ] &[ -z "$USEWGET" ]; then
USEPREMIERE=""
USELIMITED=""
fi
if [ ! -z "$USEBUSINESS" ]; then
while [ $LYNXTRIES -gt 0 ]; do
if [ -z "$USEWGET" ]; then
lynx $LYNXFLAGS $BUSINESSURL > $TMPFILE 2>&1
if [ $? = "0" ]; then
LYNXTRIES=$LYNXTRIESORIG
break
else
let LYNXTRIES=LYNXTRIES-1
sleep 1
fi
else
#http_proxy=192.168.0.1:8080
wget -U "Internet Explorer" -O $TMPFILE --timeout=30 $BUSINESSURL >/dev/null 2>&1
if [ $? = "0" ] || [ -z "`cat $TMPFILE`" ]; then
LYNXTRIES=$LYNXTRIESORIG
HTMLPAGE="`lynx $LYNXFLAGS -force_html $TMPFILE`"
echo "$HTMLPAGE" > $TMPFILE
break
else
let LYNXTRIES=LYNXTRIES-1
echo -n "" > $TMPFILE
sleep 1
fi
fi
done
if [ "$LYNXTRIES" = "$LYNXTRIESORIG" ]; then
BUSINESS=`cat $TMPFILE | awk '/Opening Weekend$/,/Gross$/' | grep -a -e "(" | sed "s/^\ *//g" | sed "s/\ *$//g" | sed s/\"/$QUOTECHAR/g`
BUSINESSSHORT=`cat $TMPFILE | awk '/Opening Weekend$/,/Gross$/' | grep -a -e "[Ss][Cc][Rr][Ee][Ee][Nn]" | grep -a -e "[Uu][Ss][Aa]" | sed "s/^\ *//g" | sed "s/\ *$//g" | sed s/\"/$QUOTECHAR/g | head -n 1`
if [ -z "$BUSINESSSHORT" ]; then
BUSINESSSHORT=`cat $TMPFILE | awk '/Opening Weekend$/,/Gross$/' | grep -a -e "[Uu][Ss][Aa]" | sed "s/^\ *//g" | sed "s/\ *$//g" | sed s/\"/$QUOTECHAR/g | head -n 1`
fi
if [ -z "$BUSINESSSHORT" ]; then
BUSINESSSHORT=`echo "$BUSINESS" | head -n 1`
fi
BUSINESSSCREENS=`echo "$BUSINESSSHORT" | tr '()' '\n' | grep -a -e "[Ss][Cc][Rr][Ee][Ee][Nn]" | tr ' ' '\n' | head -n 1`
BUSINESSSCREENSNUMBER=`echo "$BUSINESSSCREENS" | sed "s/,//"` #tr -d ','`
echo "BIZNUM : $BUSINESSSCREENSNUMBER ( $BUSINESSSCREENS )" >/tmp/imdebug.log
if [ ! -z "$BUSINESSSCREENSNUMBER" ]; then
if [ $BUSINESSSCREENSNUMBER -lt 500 ]; then
ISLIMITED=$LIMITEDYES
else
ISLIMITED=$LIMITEDNO
fi
else
ISLIMITED=""
fi
fi
fi
if [ ! -z "$USEPREMIERE" ] || [ ! -z "$USELIMITED" ]; then
while [ $LYNXTRIES -gt 0 ]; do
if [ -z "$USEWGET" ]; then
lynx $LYNXFLAGS $RELEASEURL > $TMPFILE 2>&1
if [ $? = "0" ]; then
LYNXTRIES=$LYNXTRIESORIG
break
else
let LYNXTRIES=LYNXTRIES-1
sleep 1
fi
else
#http_proxy=192.168.0.1:8080
wget -U "Internet Explorer" -O $TMPFILE --timeout=30 $RELEASEURL >/dev/null 2>&1
if [ $? = "0" ] || [ -z "`cat $TMPFILE`" ]; then
LYNXTRIES=$LYNXTRIESORIG
HTMLPAGE="`lynx $LYNXFLAGS -force_html $TMPFILE`"
echo "$HTMLPAGE" > $TMPFILE
break
else
let LYNXTRIES=LYNXTRIES-1
echo -n "" > $TMPFILE
sleep 1
fi
fi
done
if [ "$LYNXTRIES" = "$LYNXTRIESORIG" ]; then
if [ ! -z "$USEPREMIERE" ]; then
PREMIERE=`cat $TMPFILE | awk /Date$/,/endofThefile/ | grep -a -e "(" | grep -a -e "[Pp][Rr][Ee][Mm][Ii][Ee][Rr][Ee]" | head -n 1 | sed "s/^\ *//g" | sed "s/\ *$//g" | sed "s/ (/(/" | tr '(' '\n' | tr -s ' ' | head -n 1 | sed s/\"/$QUOTECHAR/g`
if [ -z "$PREMIERE" ]; then
PREMIERE=`cat $TMPFILE | awk /Date$/,/endofThefile/ | grep -a -v "Date$" | head -n 1 | sed "s/^\ *//g" | sed "s/\ *$//g" | sed "s/ (/(/" | tr '(' '\n' | tr -s ' ' | head -n 1 | sed s/\"/$QUOTECHAR/g`
fi
if [ -z "`echo "$PREMIERE" | tr -cd '0-9'`" ]; then
PREMIERE=""
fi
fi
if [ ! -z "$USELIMITED" ]; then
LIMITED=`cat $TMPFILE | awk /Date$/,/endofThefile/ | grep -a -e "(" | grep -a -e "[Ll][Ii][Mm][Ii][Tt][Ee][Dd]" | head -n 1 | sed "s/^\ *//g" | sed "s/\ *$//g" | tr -s ' ' | sed s/\"/$QUOTECHAR/g`
# if [ "$PREMIERE" = "$LIMITED" ]; then
# PREMIERE=""
# fi
fi
fi
fi
if [ ! -z "$IMDBHEAD" ]; then
BOTHEAD=`echo $BOTHEADORIG | sed "s/RELEASENAME/$BOLD$IMDBDIR$BOLD/"`
fi
if [ ! -z $DEBUG ]; then
DEBUGCOUNT=5
echo "$DEBUGCOUNT : DOTIMDB = '$DOTIMDB'"
echo "$DEBUGCOUNT : USEBOT = '$USEBOT'"
fi
if [ ! -z "$DIRECTOR" ]; then
DIRECTOR="Directed by..: $DIRECTOR"
fi
if [ ! -z $DEBUG ]; then
DEBUGCOUNT=6
echo "$DEBUGCOUNT : DOTIMDB = '$DOTIMDB'"
echo "$DEBUGCOUNT : USEBOT = '$USEBOT'"
fi
if [ ! -z "$USEBOT" ]; then
# Time to put stuff out so the bot can read it.
###############################################
if [ ! -z "$LOCALURL" ]; then
IMDBURL="`echo $IMDBURL | sed "s|/former.|/$LOCALURL.|g" | tr 'A-Z' 'a-z'`"
else
IMDBURL="`echo $IMDBURL | sed "s|/former.|/www.|g" | tr 'A-Z' 'a-z'`"
fi
HEADTMP="Title........: $BOLD$TITLE$BOLD"
if [ ! -z "$COUNTRY" ]; then
HEADTMP="$HEADTMP / $COUNTRY"
fi
if [ ! -z "$LANGUAGE" ]; then
HEADTMP="$HEADTMP / $BOLD$LANGUAGE$BOLD"
fi
HEAD=`echo "$HEADTMP" | sed "s/Country......: //" | sed "s/Language.....: //" | tr -s ' '`
if [ ! -z "$BOTHEAD" ]; then
echo "$DATE $TRIGGER \"$IMDBLKL\" \"$BOTHEAD\" \"$IMDBDST\"" >> $GLLOG
fi
if [ ! -z "$HEAD" ] && [ -z "$BOTONELINE" ]; then
echo "$DATE $TRIGGER \"$IMDBLKL\" \"$HEAD\" \"$IMDBDST\"" >> $GLLOG
fi
if [ -z "$BOTONELINE" ]; then
echo "$DATE $TRIGGER \"$IMDBLKL\" \"IMDb Link....: $IMDBURL\" \"$IMDBDST\"" >> $GLLOG
fi
if [ ! -z "$DIRECTOR" ] && [ -z "$BOTONELINE" ]; then
echo "$DATE $TRIGGER \"$IMDBLKL\" \"$DIRECTOR\" \"$IMDBDST\"" >> $GLLOG
fi
if [ ! -z "$GENRE" ] && [ -z "$BOTONELINE" ]; then
echo "$DATE $TRIGGER \"$IMDBLKL\" \"$GENRE\" \"$IMDBDST\"" >> $GLLOG
fi
if [ ! -z "$RATING" ] && [ -z "$BOTONELINE" ]; then
echo "$DATE $TRIGGER \"$IMDBLKL\" \"$RATING\" \"$IMDBDST\"" >> $GLLOG
fi
if [ ! -z "$SHOWSTAR" ] && [ -z "$BOTONELINE" ] && [ ! -z "$CASTLEADNAME" ]; then
echo "$DATE $TRIGGER \"$IMDBLKL\" \"Starring.....: $CASTLEADNAME as $CASTLEADCHAR\" \"$IMDBDST\"" >> $GLLOG
fi
if [ ! -z "$RUNTIME" ] && [ -z "$BOTONELINE" ]; then
echo "$DATE $TRIGGER \"$IMDBLKL\" \"$RUNTIME\" \"$IMDBDST\"" >> $GLLOG
fi
if [ ! -z "$BUSINESSSHORT" ] && [ -z "$BOTONELINE" ]; then
echo "$DATE $TRIGGER \"$IMDBLKL\" \"Opening Stats: $BUSINESSSHORT\" \"$IMDBDST\"" | tr '[=$=]' '¤' | sed "s|¤|USD|g" >> $GLLOG
fi
if [ ! -z "$PREMIERE" ] && [ -z "$BOTONELINE" ]; then
echo "$DATE $TRIGGER \"$IMDBLKL\" \"Premiere Date: $PREMIERE\" \"$IMDBDST\"" >> $GLLOG
fi
if [ ! -z "$LIMITED" ] && [ -z "$BOTONELINE" ]; then
echo "$DATE $TRIGGER \"$IMDBLKL\" \"Limited Date.: $LIMITED\" \"$IMDBDST\"" >> $GLLOG
fi
if [ ! -z "$TAGLINE" ] && [ ! -z "$PLOT" ] && [ -z "$BOTONELINE" ]; then
if [ "$TAGPLOT" = "TAG" ] || [ -z "$TAGPLOT" ] ; then
echo "$DATE $TRIGGER \"$IMDBLKL\" \"$TAGLINE\" \"$IMDBDST\"" >> $GLLOG
fi
if [ "$TAGPLOT" = "PLOT" ] || [ -z "$TAGPLOT" ]; then
echo "$DATE $TRIGGER \"$IMDBLKL\" \"$PLOT\" \"$IMDBDST\"" >> $GLLOG
fi
elif [ ! -z "$TAGLINE" ] && [ ! "$TAGPLOT" = "NONE" ] && [ -z "$BOTONELINE" ]; then
echo "$DATE $TRIGGER \"$IMDBLKL\" \"$TAGLINE\" \"$IMDBDST\"" >> $GLLOG
elif [ ! -z "$PLOT" ] && [ ! "$TAGPLOT" = "NONE" ] && [ -z "$BOTONELINE" ]; then
echo "$DATE $TRIGGER \"$IMDBLKL\" \"$PLOT\" \"$IMDBDST\"" >> $GLLOG
fi
if [ ! -z "$SHOWCOMMENTSHORT" ] && [ ! "$COMMENTSHORT" = "User Comments:" ] && [ -z "$BOTONELINE" ]; then
echo "$DATE $TRIGGER \"$IMDBLKL\" \"$COMMENTSHORT\" \"$IMDBDST\"" >> $GLLOG
fi
if [ ! -z "$BOTONELINE" ]; then
if [ -z "$LOGFORMAT" ]; then
echo "$DATE $TRIGGER \"$IMDBLKL\" \"$ONELINE\" \"$IMDBDST\"" >> $GLLOG
elif [ "$LOGFORMAT" = "MYOWN" ]; then
# NEWLINE="|"
MYOWNPAIRS="%imdbdirname|IMDBDIR %imdburl|IMDBURL %imdbtitle|TITLE %imdbgenre|GENRECLEAN %imdbrating|RATINGCLEAN %imdbcountry|COUNTRYCLEAN %imdblanguage|LANGUAGECLEAN %imdbcertification|CERTCLEAN %imdbruntime|RUNTIMECLEAN %imdbdirector|DIRECTORCLEAN %imdbbusinessdata|BUSINESSSHORT %imdbpremiereinfo|PREMIERE %imdblimitedinfo|LIMITED %imdbvotes|RATINGVOTES %imdbscore|RATINGSCORE %imdbname|TITLENAME %imdbyear|TITLEYEAR %imdbnumscreens|BUSINESSSCREENS %imdbislimited|ISLIMITED %imdbcastleadname|CASTLEADNAME %imdbcastleadchar|CASTLEADCHAR %imdbtagline|TAGLINECLEAN %imdbplot|PLOTCLEAN %imdbbar|RATINGBAR %imdbcasting|CASTCLEAN %imdbcommentshort|COMMENTSHORTCLEAN %newline|NEWLINE %bold|BOLD"
MYOWNFORMAT1="$MYOWNFORMAT"
for OWNPAIR in $MYOWNPAIRS; do
MYOWNSTRING="`echo "$OWNPAIR" | cut -d '|' -f 1`"
MYOWNVAR="`echo "$OWNPAIR" | cut -d '|' -f 2`"
if [ ! -z "${!MYOWNVAR}" ]; then
MYTEMPVAR="`echo "${!MYOWNVAR}" | tr '\&' '\`'`"
MYOWNFORMAT1="`echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYTEMPVAR^g" | tr '\`' '\&'`"
else
MYOWNFORMAT1="`echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYOWNEMPTY^g"`"
fi
done
echo "$DATE $TRIGGER \"$IMDBLKL\" \"${MYOWNFORMAT1}\" \"$IMDBDST\"" | tr '[=$=]' '¤' | sed "s|¤|USD|g" >> $GLLOG
else
echo "$DATE $TRIGGER \"$IMDBLKL\" \"$IMDBDIR\" \"$IMDBURL\" \"$TITLE\" \"$GENRECLEAN\" \"$RATINGCLEAN\" \"$COUNTRYCLEAN\" \"$LANGUAGECLEAN\" \"$CERTCLEAN\" \"$RUNTIMECLEAN\" \"$DIRECTORCLEAN\" \"$BUSINESSSHORT\" \"$PREMIERE\" \"$LIMITED\" \"$RATINGVOTES\" \"$RATINGSCORE\" \"$TITLENAME\" \"$TITLEYEAR\" \"$BUSINESSSCREENS\" \"$ISLIMITED\" \"$CASTLEADNAME\" \"$CASTLEADCHAR\" \"$TAGLINECLEAN\" \"$PLOTCLEAN\" \"$RATINGBAR\" \"$CASTCLEAN\" \"$COMMENTSHORTCLEAN\" \"$IMDBDST\"" | tr '[=$=]' '¤' | sed "s|¤|USD|g" >> $GLLOG
fi
fi
fi
if [ ! -z "$DOTIMDB" ]; then
# Echo stuff to the .imdb file
##############################
echo -e "$IMDBHEAD" > "$IMDBLNK"
OWNER=`ls -1nl "$GLROOT$IMDBLKL" | tail -n 1 | { read junk junk owner group junk; echo $owner:$group; };`
echo "Title........: $TITLE" | fold -s -w $IMDBWIDTH | head -n 1 >> "$IMDBLNK"
echo "-" >> "$IMDBLNK"
echo "IMDb Link....: $IMDBURL" | head -n 1 >> "$IMDBLNK"
if [ ! -z "$DIRECTOR" ]; then
echo "$DIRECTOR" | fold -s -w $IMDBWIDTH | head -n 1 >> "$IMDBLNK"
fi
if [ ! -z "$GENRE" ]; then
echo "$GENRE" | fold -s -w $IMDBWIDTH | head -n 1 >> "$IMDBLNK"
fi
if [ ! -z "$RATING" ]; then
echo "$RATING" | fold -s -w $IMDBWIDTH | head -n 1 >> "$IMDBLNK"
fi
if [ ! -z "$TAGLINE" ]; then
echo "$TAGLINE" | fold -s -w $IMDBWIDTH >> "$IMDBLNK"
fi
echo "-" >> "$IMDBLNK"
if [ ! -z "$COUNTRY" ]; then
echo "$COUNTRY" | fold -s -w $IMDBWIDTH | head -n 1 >> "$IMDBLNK"
fi
if [ ! -z "$LANGUAGE" ]; then
echo "$LANGUAGE" | fold -s -w $IMDBWIDTH | head -n 1 >> "$IMDBLNK"
fi
if [ ! -z "$CERT" ]; then
echo "$CERT" | fold -s -w $IMDBWIDTH | head -n 1 >> "$IMDBLNK"
fi
if [ ! -z "$PREMIERE" ]; then
echo "Premiere Date: $PREMIERE" | fold -s -w $IMDBWIDTH | head -n 1 >> "$IMDBLNK"
fi
if [ ! -z "$LIMITED" ]; then
echo "Limited Date.: $LIMITED" | fold -s -w $IMDBWIDTH | head -n 1 >> "$IMDBLNK"
fi
if [ ! -z "$RUNTIME" ]; then
echo "$RUNTIME" | fold -s -w $IMDBWIDTH | head -n 1 >> "$IMDBLNK"
fi
if [ ! -z "$CAST" ]; then
echo "-" >> "$IMDBLNK"
echo "Credited Cast:" >> "$IMDBLNK"
echo "$CAST" | fold -s -w $IMDBWIDTH >> "$IMDBLNK"
fi
if [ ! -z "$BUSINESS" ]; then
echo "-" >> "$IMDBLNK"
echo "Business Data on Opening Weekend:" >> "$IMDBLNK"
echo "$BUSINESS" | fold -s -w $IMDBWIDTH >> "$IMDBLNK"
fi
if [ ! -z "$PLOT" ]; then
echo "-" >> "$IMDBLNK"
echo "$PLOT" | fold -s -w $IMDBWIDTH >> "$IMDBLNK"
fi
if [ ! -z "$SHOWCOMMENT" ] && [ ! -z "`echo $COMMENT | grep -a -e "^User Comments:" | grep -a -e "Check for other user comments.$"`" ]; then
echo "---" >> "$IMDBLNK"
echo "User Comments:" >> "$IMDBLNK"
echo "$COMMENT" | grep -a -e "^ " | sed "s/^\ *//g" | sed "s/\ *$//g" | tr -s ' ' | fold -s -w $IMDBWIDTH >> "$IMDBLNK"
fi
echo -e "$IMDBTAIL" >> "$IMDBLNK"
fi
if [ ! -z "$INFOTEMPNAME" ]; then
# make a file/dir with imdb info in the name
INFOGENRES=`echo $GENRECLEAN | tr '/ ' '\n' | sed -e /^$/d | wc -l`
if [ ! $INFOGENRES -gt $INFOGENREMAX ]; then
let INFOGENREMAXED=INFOGENRES
else
let INFOGENREMAXED=INFOGENREMAX
fi
if [ ! $INFOGENRES -lt 1 ]; then
GENREFILE="`echo $GENRECLEAN | tr '/ ' '\n' | sed -e /^$/d | head -n $INFOGENREMAX | tr '\n' ' ' | sed "s/ /$INFOGENRESEP/g" | cut -d "$INFOGENRESEP" -f 1-$INFOGENREMAXED`"
else
GENREFILE="Unclassified"
fi
VOTESFILE="`echo $RATINGVOTES | tr ',' '.'`"
if [ -z "$ISLIMITED" ]; then
ISLIMITED="unknown"
fi
NUMSCREENS="`echo $BUSINESSSCREENS | tr ',' '.'`"
if [ -z "$NUMSCREENS" ]; then
NUMSCREENS="unknown"
fi
if [ -z "$RUNTIMECLEAN" ]; then
RUNTIMECLEAN="unknown"
fi
INFOFILENAMEOLD="`echo "$INFOFILENAME" | tr -c $INFOVALID $INFOCHARTO | sed "s%VOTES%*%g" | sed "s%SCORE%*%g" | sed "s%GENRE%*%g" | sed "s%RUNTIME%*%g" | sed "s%YEAR%*%g" | sed "s%ISLIMITED%*%g" | sed "s%SCREENS%*%g" | tr -d ' '`"
INFOFILENAMEOLDA="`echo "$INFOFILENAMEOLD" | sed "s%*%.*%g"`"
INFOFILENAMEOLDB="`echo "$INFOFILENAMEOLDA" | tr '\]\[' '.'`"
INFOFILENAMEPRINT="`echo "$INFOFILENAME" | sed "s%VOTES%$VOTESFILE%g" | sed "s%SCORE%$RATINGSCORE%g" | sed "s%GENRE%$GENREFILE%g" | sed "s%RUNTIME%$RUNTIMECLEAN%g" | sed "s%YEAR%$TITLEYEAR%g" | sed "s%ISLIMITED%$ISLIMITED%g" | sed "s%SCREENS%$NUMSCREENS%g"`"
INFOFILENAMEPRINT="`echo "$INFOFILENAMEPRINT" | tr -c $INFOVALID $INFOCHARTO`"
if [ ! -z "`ls -1 "$GLROOT$IMDBLKL" | grep -a -e "$INFOFILENAMEOLDB"`" ]; then
for OLDINFOFILE in `ls -1 "$GLROOT$IMDBLKL" | grep -a -e "$INFOFILENAMEOLDB" | tr -d ' '`; do
rm -f "$GLROOT$IMDBLKL/"$OLDINFOFILE >/dev/null 2>&1
rmdir "$GLROOT$IMDBLKL/"$OLDINFOFILE >/dev/null 2>&1
done
fi
if [ -e "$GLROOT$IMDBLKL/$INFOTEMPNAME" ]; then
mv "$GLROOT$IMDBLKL/$INFOTEMPNAME" "$GLROOT$IMDBLKL/$INFOFILENAMEPRINT"
fi
fi
# Should we run any external scripts?
if [ ! -z "$EXTERNALSCRIPTNAME" ]; then
FILENAMED=`ls -1Ftr "$GLROOT$IMDBLKL" | grep -a -v "/" | grep -a -v "@" | grep -a -e "[.][nN][fF][oO]" | head -n 1`
if [ ! -z "$FILENAMED" ]; then
touch -acmr "$GLROOT$IMDBLKL/$FILENAMED" "$GLROOT$IMDBLKL" >/dev/null 2>&1
fi
for EXTERNALNAME in $EXTERNALSCRIPTNAME; do
if [ "$DEBUG" = "4" ] && [ ! -z "`head -n 1 $EXTERNALNAME | grep -a -e "/bin/bash"`" ]; then
bash -x -v $EXTERNALNAME "\"$DATE\" \"$IMDBLNK\" \"$IMDBLKL\" \"$IMDBDIR\" \"$IMDBURL\" \"$TITLE\" \"$GENRECLEAN\" \"$RATINGCLEAN\" \"$COUNTRYCLEAN\" \"$LANGUAGECLEAN\" \"$CERTCLEAN\" \"$RUNTIMECLEAN\" \"$DIRECTORCLEAN\" \"$BUSINESSSHORT\" \"$PREMIERE\" \"$LIMITED\" \"$RATINGVOTES\" \"$RATINGSCORE\" \"$TITLENAME\" \"$TITLEYEAR\" \"$BUSINESSSCREENS\" \"$ISLIMITED\" \"$CASTLEADNAME\" \"$CASTLEADCHAR\" \"$TAGLINECLEAN\" \"$PLOTCLEAN\" \"$RATINGBAR\" \"$CASTCLEAN\" \"$COMMENTSHORTCLEAN\" \"$COMMENTCLEAN\""
else
$EXTERNALNAME "\"$DATE\" \"$IMDBLNK\" \"$IMDBLKL\" \"$IMDBDIR\" \"$IMDBURL\" \"$TITLE\" \"$GENRECLEAN\" \"$RATINGCLEAN\" \"$COUNTRYCLEAN\" \"$LANGUAGECLEAN\" \"$CERTCLEAN\" \"$RUNTIMECLEAN\" \"$DIRECTORCLEAN\" \"$BUSINESSSHORT\" \"$PREMIERE\" \"$LIMITED\" \"$RATINGVOTES\" \"$RATINGSCORE\" \"$TITLENAME\" \"$TITLEYEAR\" \"$BUSINESSSCREENS\" \"$ISLIMITED\" \"$CASTLEADNAME\" \"$CASTLEADCHAR\" \"$TAGLINECLEAN\" \"$PLOTCLEAN\" \"$RATINGBAR\" \"$CASTCLEAN\" \"$COMMENTSHORTCLEAN\" \"$COMMENTCLEAN\""
fi
done
# restore the releasedir's original date.
#########################################
FILENAMED=`ls -1Ftr "$GLROOT$IMDBLKL" | grep -a -v "/" | grep -a -v "@" | grep -a -e "[.][nN][fF][oO]" | head -n 1`
if [ ! -z "$FILENAMED" ]; then
touch -acmr "$GLROOT$IMDBLKL/$FILENAMED" "$GLROOT$IMDBLKL" >/dev/null 2>&1
fi
fi
fi
# clean up and make ready for next run.
#######################################
cat $IMDBLOG | grep -a -F -v "$IMDBLINE" > $TMPFILE
cat $TMPFILE > $IMDBLOG
echo -n "" > $TMPFILE
done
echo -n "" > $IMDBPID
fi
+ '[' '!' -z '' ']'
+ '[' -z '' ']'
basename "$0"
++ basename /glftpd/bin/psxc-imdb.sh
+ '[' psxc-imdb.sh = psxc-imdb-pre.sh ']'
+ '[' '!' -e /glftpd/ftp-data/logs/psxc-imdb.log ']'
cat $IMDBLOG
++ cat /glftpd/ftp-data/logs/psxc-imdb.log
+ '[' -z 'http://former.imdb.com/title/tt0449467|/site/XVID/Test' ']'
+ sleep 0.8916
basename "$0"
++ basename /glftpd/bin/psxc-imdb.sh
+ MYNAMEIS=psxc-imdb.sh
cat $IMDBPID
++ cat /glftpd/ftp-data/logs/psxc-imdb.log.pid
+ IMDBPIDCONTENT=
+ '[' '!' -z '' ']'
+ echo 12672
head -n 1 $TMPFILE | tr -cd '0-9'
++ head -n 1 /glftpd/ftp-data/logs/psxc-imdb.tmp
++ tr -cd 0-9
+ IMDBFLAGS=
+ '[' '!' -z '' ']'
+ '[' -z 99 ']'
+ '[' 99 -eq 0 ']'
+ '[' -z 99 ']'
+ '[' 99 -eq 0 ']'
+ '[' -z 99 ']'
+ '[' 99 -eq 0 ']'
+ '[' -z 5 ']'
+ '[' 5 -eq 0 ']'
+ '[' -z 99 ']'
+ '[' 99 -eq 0 ']'
+ '[' -z 99 ']'
+ '[' 99 -eq 0 ']'
cat $IMDBLOG
++ cat /glftpd/ftp-data/logs/psxc-imdb.log
+ '[' '!' -z 'http://former.imdb.com/title/tt0449467|/site/XVID/Test' ']'
cat $IMDBLOG | grep -a -e "/" | head -n 1
++ cat /glftpd/ftp-data/logs/psxc-imdb.log
++ grep -a -e /
++ head -n 1
+ IMDBLINE=http://former.imdb.com/title/tt0449467|/site/XVID/Test
+ cat /glftpd/ftp-data/logs/psxc-imdb.log
+ grep -a -F -v 'http://former.imdb.com/title/tt0449467|/site/XVID/Test'
+ cat /glftpd/ftp-data/logs/psxc-imdb.tmp
+ ISLIMITED=
+ BUSINESS=
+ BUSINESSSHORT=
+ PREMIERE=
+ LIMITED=
+ EXEMPTED=
+ LYNXTRIESORIG=3
echo $IMDBLINE | cut -d "|" -f 1
++ echo 'http://former.imdb.com/title/tt0449467|/site/XVID/Test'
++ cut -d '|' -f 1
+ IMDBURL=http://former.imdb.com/title/tt0449467
echo $IMDBLINE | cut -d "|" -f 2
++ echo 'http://former.imdb.com/title/tt0449467|/site/XVID/Test'
++ cut -d '|' -f 2
+ IMDBLNK=/site/XVID/Test
echo $IMDBLINE | cut -d "|" -f 3
++ echo 'http://former.imdb.com/title/tt0449467|/site/XVID/Test'
++ cut -d '|' -f 3
+ IMDBDST=
+ DEBUGCOUNT=1
+ '[' '!' -z ']'
+ '[' -d /glftpd/site/XVID/Test ']'
basename "$IMDBLNK"
++ basename /site/XVID/Test
+ IMDBDIR=Test
dirname "$IMDBLNK"
++ dirname /site/XVID/Test
+ BASELNK=/site/XVID
+ IMDBLKL=/site/XVID/Test
+ IMDBLNK=/glftpd/site/XVID/Test/.imdb
+ DEBUGCOUNT=2
+ '[' '!' -z ']'
echo "$IMDBLKL" | grep -a "$EXEMPT"
++ echo /site/XVID/Test
++ grep -a /site/+Private
+ '[' '!' -z ']'
+ '[' '!' -z MYOWN ']'
+ BOTONELINE=YES
+ TAGPLOT=
+ BOTHEAD=
+ DEBUGCOUNT=3
+ '[' '!' -z ']'
cat $IMDBURLLOG | grep -a "$IMDBURL"
++ cat /glftpd/ftp-data/logs/psxc-imdb.log.keep
++ grep -a http://former.imdb.com/title/tt0449467
+ '[' '!' -z ']'
+ '[' '!' -z ']'
+ '[' '!' /site/XVID/Test = /dev/null ']'
+ echo http://former.imdb.com/title/tt0449467
+ tail -n 10 /glftpd/ftp-data/logs/psxc-imdb.log.keep
+ cat /glftpd/ftp-data/logs/psxc-imdb.tmp
+ echo -n ''
+ DEBUGCOUNT=4
+ '[' '!' -z ']'
+ OUTPUTTRIES=1
+ OUTPUTOK=
+ '[' -z '' ']'
+ '[' 1 -le 3 ']'
+ let OUTPUTTRIES=OUTPUTTRIES+1
+ OUTPUTOK=OK
+ '[' 3 -gt 0 ']'
+ '[' -z YES ']'
+ wget -U 'Internet Explorer' -O /glftpd/ftp-data/logs/psxc-imdb.tmp --timeout=30 http://former.imdb.com/title/tt0449467
+ '[' 0 = 0 ']'
+ LYNXTRIES=3
lynx $LYNXFLAGS -force_html $TMPFILE
++ lynx -dump -nolist -width=1000 -hiddenlinks=ignore -connect_timeout=10 -force_html /glftpd/ftp-data/logs/psxc-imdb.tmp
+ HTMLPAGE=
Home
Now Playing Movie/TV News My Movies DVD/Video IMDbTV Message Boards Showtimes & Tickets Game Base IMDbPro
Login | Register
Home | Top Movies | Photos | Independent Film | Browse | Help
Search [All..........] ____________________________ Submit more | tips
Questions about our new look? See our Redesign FAQ for answers.
Overview
(o) main details
( ) combined details
( ) full cast and crew
( ) company credits
( ) on television
Awards and Reviews
( ) user comments
( ) external reviews
( ) newsgroup reviews
( ) awards & nominations
( ) user ratings
( ) recommendations
( ) message board
Plot and Quotes
( ) plot summary
( ) plot keywords
(X) Amazon.com summary
( ) memorable quotes
Fun Stuff
( ) trivia
( ) goofs
( ) soundtrack listing
(X) crazy credits
(X) alternate versions
( ) movie connections
( ) FAQ
Other Info
( ) merchandising links
( ) box office & business
( ) release dates
( ) filming locations
( ) technical specs
(X) laserdisc details
( ) DVD details
( ) literature listings
( ) news articles
Promotional
( ) taglines
( ) trailers
( ) posters
( ) photo gallery
External Links
( ) showtimes
( ) official site
( ) miscellaneous
( ) photographs
( ) sound clip(s)
(X) video clip(s)
vote
[Your Vote.....] Cast vote
You need to be a registered user of the IMDb to rate a movie
comment
- I have seen this movie and would like to submit a comment
Babel (2006)
Babel Directed by
Alejandro González Iñárritu
Writing credits (WGA)
Guillermo Arriaga (written by)
Guillermo Arriaga (idea) ...
(more)
> watch the trailer
Add this title to MyMovies Add to MyMovies Photo Gallery Photo Gallery [10.gif] IMDbPro Details
Photo Gallery (125 photos)
[th-photo_hi_3431.jpg] [th-photo_hi_4182.jpg] [th-photo_hi_4186.JPG] [th-photo_hi_4185.JPG] more [f114.gif]
Showtimes & Tickets (Register to personalize)
Genre: Drama / Thriller (more)
Tagline: If You Want to be Understood...Listen (more)
Plot Outline: Tragedy strikes a married couple on vacation in the Moroccan desert, touching off an interlocking story involving four different families. (more) (view trailer)
User Comments: An Exhausting Film (more)
User Rating: * * * * * * * * _ _ 7.8/10 (21,517 votes) Vote Here
Cast overview, first billed only:
[38t.jpg]
Brad Pitt .... Richard
[48t.jpg]
Cate Blanchett .... Susan
[b.gif] Mohamed Akhzam .... Anwar
[b.gif] Peter Wight .... Tom
[b.gif] Harriet Walter .... Lilly
[b.gif] Trevor Martin .... Douglas
[b.gif] Matyelok Gibbs .... Elyse
[b.gif] Georges Bousquet .... Robert
[b.gif] Claudine Acs .... Jane
[b.gif] André Oumansky .... Walter
[b.gif] Michael Maloney .... James
[b.gif] Dermot Crowley .... Barth
[b.gif] Wendy Nottingham .... Tourist #1
[b.gif] Henry Maratray .... Tourist #2
[b.gif] Linda Broughton .... Tourist #3
(more)
Also Known As:
Babel (France)
MPAA: Rated R for violence, some graphic nudity, sexual content, language and some drug use.
Runtime: 142 min
Country: France / USA / Mexico
Language: Japanese Sign Language / French / English / Spanish / Japanese / Berber / Arabic
Color: Color
Sound Mix: Dolby Digital / DTS
Certification: Sweden:11 / Norway:15 / New Zealand:R16 / Denmark:15 / Canada:14A (Alberta/Manitoba/Ontario) / Canada:13+ (Quebec) / Australia:MA / Germany:16 / Portugal:M/12 / Hong Kong:IIB / Canada:18A (British Columbia) / Netherlands:16 / Ireland:16 / Switzerland:14 (canton of Vaud) / Brazil:16 / Iran:18+ / Switzerland:14 (canton of Geneva) / Philippines:PG-13 (Limited) / USA:R (certificate #42677) / Argentina:18 / Finland:K-15 / Malaysia:18PL / South Korea:18 / Singapore:M18 / France:Unrated / UK:15 / South Africa:16 (LN)
Trivia: Rinko Kikuchi went through a year long audition process before finally gaining the role of Chieko. (more)
Goofs: Continuity: During the phone call taking place when the bus is leaving, Richard's watch is clean. Before and after, it is covered with blood and grime. (more)
Quotes: Amelia: Help! Ayudame! HELP! (more)
Awards: Nominated for 7 Oscars. Another 17 wins & 59 nominations (more)
FAQ:
What does the title mean?
Regarding the phone call at the end. How'd Amelia get back into the US?
How does it end?
(more)
IFRAME: http://ad.doubleclick.net/adi/N2928.IMDB/B2151868;sz=160x600;ord=1172404530?
Click Here
_____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
User Comments:
322 out of 555 people found the following comment useful:-
An Exhausting Film, 19 October 2006
6/10
Author: brocksilvey from United States
Alas, it appears that, based on other user comments here at IMDb, I am in the minority on this film. I found it to be tedious and exhausting, and the effort I put into sticking with it far outweighed any sense of closure I received from it.
Alejandro Gonzalez Inarritu appeared at the screening I saw and introduced his film as the final entry in a trilogy that includes "Amores Perros" and "21 Grams." Inarritu, in a comment that surprised me, said that his intent with this trilogy was not to focus on politics or social commentary, but rather to look at the modern family and what it means to be a father, son, mother, daughter, etc. This may have been his intention, but I don't feel that over the course of three entire films Innaritu did say much about these issues. Instead, he has painted a portrait of the world as he apparently sees it as a pretty bleak, uncaring and unforgiving place to live. I thought "Amore Perros" was so pessimistic as to border on nihilism; "21 Grams" came closer to finding a sense of peace and redemption among the general human crappiness. "Babel" sticks closer to the sentiments of the first film than the latter.
"Babel" is of course about communication, or more exactly miscommunication, in the modern world. It's a theme that has engaged the interest of many a filmmaker lately -- the idea that technology has made instant communication so much easier, yet people seem to be more than ever incapable of understanding one another. It's a conceit that greatly interests me, but Innaritu doesn't exploit its potential here. "Babel" consists of a monotonous series of scenes in which people shout, storm, fight and talk over one another, always in a hurry to be understood without taking the time to understand. Very well, point taken. But Inarritu makes this point within the film's first half hour -- you only need see one or two scenes of this kind of frustrating verbal gridlock to understand what he's trying to say; after that, the frustration just mounts without any kind of pay off. People are mean to one another, some are unbelievably callous (I didn't buy for a second that the group of
tourists who accompany Brad Pitt and Cate Blanchett's characters to a remote Moroccan village after Blanchett is accidentally shot would be so uncaring as Innaritu depicts them). In Inarritu's world, all authority figures are to be justifiably feared, as they go around beating everybody up and pulling guns on innocent people. There's no nuance in Innaritu's world; he pounds his message into you. For example, he obviously feels strongly about the mistreatment of illegal immigrants, especially those from Mexico, but instead of engaging in an intelligent debate about the topic, he sets up such an implausible, not to mention one-sided, scenario in this film that you can't help but agree with him.
The biggest disappointment in "Babel" is his failure to fully utilize a couple of wonderful actors he has assembled. Cate Blanchett is utterly wasted as the caustic American wife whose shooting sets off the chain of events. And Gael Garcia Bernal likewise gets nothing to do as a hot-headed Mexican whose attempts to run from border patrol creates a sad ending for one of the major characters. Brad Pitt does better than expected with the frenzied, frustrated husband of Blanchett. But these people have no history. We know virtually nothing about anybody in the film, yet are expected to care deeply about what happens to them. Maybe that's part of Innaritu's point -- that we're all connected to one another even if we don't know it, and that the world has become so small that there are no longer such things as strangers in it. But this is a film narrative, not real life, and you can't build a compelling one out of anonymous characters.
After "21 Grams" I thought I was warming up to Inarritu, but this film has sent me back to the detractors' camp. He certainly knows how to put a movie together, and he finds engaging ways to tell his stories. But his attitudes and approach to the modern world are so depressing and fatalistic that his films push me away rather than draw me in.
Grade: C+
Was the above comment useful to you? yes no
Check for other user comments.
I have seen this movie and would like to comment on it
_____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
Message Boards
Discuss this movie with other users on IMDb message board for Babel (2006)
Recent Posts (updated daily) User
Why did she risk going back to Mexico? RTSimantel
Touching chaos brenq68
what did the japanese girl wrote ont he note she gave the officer? tovasa
Another bit of confusion...beginni ng phone call and ending phone call tomosborn
Babel HD DVD issues jdarndt
Significance of the scene with Amelia... dajet00
(more)
_____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
IFRAME: kanoodleAd
_____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
Recommendations
If you like this title, we also recommend...
Traffic (2000)
Show more recommendations
Add a recommendation
_____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
Update Information
Update Information
You may report errors and omissions on this page to the IMDb database managers. They will be examined and if approved will be included in a future update. Clicking the 'Update' button will take you through a step-by-step process.
Related Pages
( ) view previous title
( ) title index
( ) view next title
_____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
Home | Search | Now Playing | News | My Movies | Games | Boards | Help | US Movie Showtimes | Top 250 | Register | Recommendations
Box Office | Index | Trailers | Jobs | IMDbPro.com - Free Trial | IMDb Resume
Copyright © 1990-2007 Internet Movie Database Inc.
Terms and Privacy Policy under which this service is provided to you.
An Amazon.com company. Advertise on IMDb. License our content.
+ echo '
Home
Now Playing Movie/TV News My Movies DVD/Video IMDbTV Message Boards Showtimes & Tickets Game Base IMDbPro
Login | Register
Home | Top Movies | Photos | Independent Film | Browse | Help
Search [All..........] ____________________________ Submit more | tips
Questions about our new look? See our Redesign FAQ for answers.
Overview
(o) main details
( ) combined details
( ) full cast and crew
( ) company credits
( ) on television
Awards and Reviews
( ) user comments
( ) external reviews
( ) newsgroup reviews
( ) awards & nominations
( ) user ratings
( ) recommendations
( ) message board
Plot and Quotes
( ) plot summary
( ) plot keywords
(X) Amazon.com summary
( ) memorable quotes
Fun Stuff
( ) trivia
( ) goofs
( ) soundtrack listing
(X) crazy credits
(X) alternate versions
( ) movie connections
( ) FAQ
Other Info
( ) merchandising links
( ) box office & business
( ) release dates
( ) filming locations
( ) technical specs
(X) laserdisc details
( ) DVD details
( ) literature listings
( ) news articles
Promotional
( ) taglines
( ) trailers
( ) posters
( ) photo gallery
External Links
( ) showtimes
( ) official site
( ) miscellaneous
( ) photographs
( ) sound clip(s)
(X) video clip(s)
vote
[Your Vote.....] Cast vote
You need to be a registered user of the IMDb to rate a movie
comment
- I have seen this movie and would like to submit a comment
Babel (2006)
Babel Directed by
Alejandro González Iñárritu
Writing credits (WGA)
Guillermo Arriaga (written by)
Guillermo Arriaga (idea) ...
(more)
> watch the trailer
Add this title to MyMovies Add to MyMovies Photo Gallery Photo Gallery [10.gif] IMDbPro Details
Photo Gallery (125 photos)
[th-photo_hi_3431.jpg] [th-photo_hi_4182.jpg] [th-photo_hi_4186.JPG] [th-photo_hi_4185.JPG] more [f114.gif]
Showtimes & Tickets (Register to personalize)
Genre: Drama / Thriller (more)
Tagline: If You Want to be Understood...Listen (more)
Plot Outline: Tragedy strikes a married couple on vacation in the Moroccan desert, touching off an interlocking story involving four different families. (more) (view trailer)
User Comments: An Exhausting Film (more)
User Rating: * * * * * * * * _ _ 7.8/10 (21,517 votes) Vote Here
Cast overview, first billed only:
[38t.jpg]
Brad Pitt .... Richard
[48t.jpg]
Cate Blanchett .... Susan
[b.gif] Mohamed Akhzam .... Anwar
[b.gif] Peter Wight .... Tom
[b.gif] Harriet Walter .... Lilly
[b.gif] Trevor Martin .... Douglas
[b.gif] Matyelok Gibbs .... Elyse
[b.gif] Georges Bousquet .... Robert
[b.gif] Claudine Acs .... Jane
[b.gif] André Oumansky .... Walter
[b.gif] Michael Maloney .... James
[b.gif] Dermot Crowley .... Barth
[b.gif] Wendy Nottingham .... Tourist #1
[b.gif] Henry Maratray .... Tourist #2
[b.gif] Linda Broughton .... Tourist #3
(more)
Also Known As:
Babel (France)
MPAA: Rated R for violence, some graphic nudity, sexual content, language and some drug use.
Runtime: 142 min
Country: France / USA / Mexico
Language: Japanese Sign Language / French / English / Spanish / Japanese / Berber / Arabic
Color: Color
Sound Mix: Dolby Digital / DTS
Certification: Sweden:11 / Norway:15 / New Zealand:R16 / Denmark:15 / Canada:14A (Alberta/Manitoba/Ontario) / Canada:13+ (Quebec) / Australia:MA / Germany:16 / Portugal:M/12 / Hong Kong:IIB / Canada:18A (British Columbia) / Netherlands:16 / Ireland:16 / Switzerland:14 (canton of Vaud) / Brazil:16 / Iran:18+ / Switzerland:14 (canton of Geneva) / Philippines:PG-13 (Limited) / USA:R (certificate #42677) / Argentina:18 / Finland:K-15 / Malaysia:18PL / South Korea:18 / Singapore:M18 / France:Unrated / UK:15 / South Africa:16 (LN)
Trivia: Rinko Kikuchi went through a year long audition process before finally gaining the role of Chieko. (more)
Goofs: Continuity: During the phone call taking place when the bus is leaving, Richard'\''s watch is clean. Before and after, it is covered with blood and grime. (more)
Quotes: Amelia: Help! Ayudame! HELP! (more)
Awards: Nominated for 7 Oscars. Another 17 wins & 59 nominations (more)
FAQ:
What does the title mean?
Regarding the phone call at the end. How'\''d Amelia get back into the US?
How does it end?
(more)
IFRAME: http://ad.doubleclick.net/adi/N2928.IMDB/B2151868;sz=160x600;ord=1172404530?
Click Here
_____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
User Comments:
322 out of 555 people found the following comment useful:-
An Exhausting Film, 19 October 2006
6/10
Author: brocksilvey from United States
Alas, it appears that, based on other user comments here at IMDb, I am in the minority on this film. I found it to be tedious and exhausting, and the effort I put into sticking with it far outweighed any sense of closure I received from it.
Alejandro Gonzalez Inarritu appeared at the screening I saw and introduced his film as the final entry in a trilogy that includes "Amores Perros" and "21 Grams." Inarritu, in a comment that surprised me, said that his intent with this trilogy was not to focus on politics or social commentary, but rather to look at the modern family and what it means to be a father, son, mother, daughter, etc. This may have been his intention, but I don'\''t feel that over the course of three entire films Innaritu did say much about these issues. Instead, he has painted a portrait of the world as he apparently sees it as a pretty bleak, uncaring and unforgiving place to live. I thought "Amore Perros" was so pessimistic as to border on nihilism; "21 Grams" came closer to finding a sense of peace and redemption among the general human crappiness. "Babel" sticks closer to the sentiments of the first film than the latter.
"Babel" is of course about communication, or more exactly miscommunication, in the modern world. It'\''s a theme that has engaged the interest of many a filmmaker lately -- the idea that technology has made instant communication so much easier, yet people seem to be more than ever incapable of understanding one another. It'\''s a conceit that greatly interests me, but Innaritu doesn'\''t exploit its potential here. "Babel" consists of a monotonous series of scenes in which people shout, storm, fight and talk over one another, always in a hurry to be understood without taking the time to understand. Very well, point taken. But Inarritu makes this point within the film'\''s first half hour -- you only need see one or two scenes of this kind of frustrating verbal gridlock to understand what he'\''s trying to say; after that, the frustration just mounts without any kind of pay off. People are mean to one another, some are unbelievably callous (I didn'\''t buy for a second that the group of
tourists who accompany Brad Pitt and Cate Blanchett'\''s characters to a remote Moroccan village after Blanchett is accidentally shot would be so uncaring as Innaritu depicts them). In Inarritu'\''s world, all authority figures are to be justifiably feared, as they go around beating everybody up and pulling guns on innocent people. There'\''s no nuance in Innaritu'\''s world; he pounds his message into you. For example, he obviously feels strongly about the mistreatment of illegal immigrants, especially those from Mexico, but instead of engaging in an intelligent debate about the topic, he sets up such an implausible, not to mention one-sided, scenario in this film that you can'\''t help but agree with him.
The biggest disappointment in "Babel" is his failure to fully utilize a couple of wonderful actors he has assembled. Cate Blanchett is utterly wasted as the caustic American wife whose shooting sets off the chain of events. And Gael Garcia Bernal likewise gets nothing to do as a hot-headed Mexican whose attempts to run from border patrol creates a sad ending for one of the major characters. Brad Pitt does better than expected with the frenzied, frustrated husband of Blanchett. But these people have no history. We know virtually nothing about anybody in the film, yet are expected to care deeply about what happens to them. Maybe that'\''s part of Innaritu'\''s point -- that we'\''re all connected to one another even if we don'\''t know it, and that the world has become so small that there are no longer such things as strangers in it. But this is a film narrative, not real life, and you can'\''t build a compelling one out of anonymous characters.
After "21 Grams" I thought I was warming up to Inarritu, but this film has sent me back to the detractors'\'' camp. He certainly knows how to put a movie together, and he finds engaging ways to tell his stories. But his attitudes and approach to the modern world are so depressing and fatalistic that his films push me away rather than draw me in.
Grade: C+
Was the above comment useful to you? yes no
Check for other user comments.
I have seen this movie and would like to comment on it
_____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
Message Boards
Discuss this movie with other users on IMDb message board for Babel (2006)
Recent Posts (updated daily) User
Why did she risk going back to Mexico? RTSimantel
Touching chaos brenq68
what did the japanese girl wrote ont he note she gave the officer? tovasa
Another bit of confusion...beginni ng phone call and ending phone call tomosborn
Babel HD DVD issues jdarndt
Significance of the scene with Amelia... dajet00
(more)
_____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
IFRAME: kanoodleAd
_____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
Recommendations
If you like this title, we also recommend...
Traffic (2000)
Show more recommendations
Add a recommendation
_____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
Update Information
Update Information
You may report errors and omissions on this page to the IMDb database managers. They will be examined and if approved will be included in a future update. Clicking the '\''Update'\'' button will take you through a step-by-step process.
Related Pages
( ) view previous title
( ) title index
( ) view next title
_____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
Home | Search | Now Playing | News | My Movies | Games | Boards | Help | US Movie Showtimes | Top 250 | Register | Recommendations
Box Office | Index | Trailers | Jobs | IMDbPro.com - Free Trial | IMDb Resume
Copyright © 1990-2007 Internet Movie Database Inc.
Terms and Privacy Policy under which this service is provided to you.
An Amazon.com company. Advertise on IMDb. License our content.'
+ break
+ '[' 3 -ne 3 ']'
cat "$TMPFILE" | grep -a -e "^[a-zA-Z0-9\"\.]" | sed "s/\"//g" | tail -n 1
++ cat /glftpd/ftp-data/logs/psxc-imdb.tmp
++ tail -n 1
+ TITLE=Babel (2006)
+ '[' -z 'Babel (2006) ' ']'
+ '[' -z 'Babel (2006) ' ']'
echo "$TITLE" | grep -a -e "with other users on IMDb"
++ echo 'Babel (2006) '
++ grep -a -e 'with other users on IMDb'
+ '[' '!' -z '' ']'
echo "$TITLE" | grep -a -e "laserdisc details"
++ echo 'Babel (2006) '
++ grep -a -e 'laserdisc details'
+ '[' '!' -z '' ']'
echo "$TITLE" | grep -a -e "(\ )"
++ echo 'Babel (2006) '
++ grep -a -e '(\ )'
+ '[' '!' -z '' ']'
echo "$TITLE" | grep -a -e "\.\.\.\."
++ echo 'Babel (2006) '
++ grep -a -e '\.\.\.\.'
+ '[' '!' -z '' ']'
echo $TITLE | tr ' ' '\n' | grep -a -v "^[a-zA-Z]" | grep -a -e "^([12]" | head -n 1
++ echo Babel '(2006)'
++ tr ' ' '\n'
++ grep -a -v '^[a-zA-Z]'
++ grep -a -e '^([12]'
++ head -n 1
+ TITLEYEAR=(2006)
echo $TITLE | sed "s| $TITLEYEAR||"
++ echo Babel '(2006)'
++ sed 's| (2006)||'
+ TITLENAME=Babel
echo $TITLEYEAR | tr -cd '0-9'
++ echo '(2006)'
++ tr -cd 0-9
+ TITLEYEAR=2006
+ '[' -z 2006 ']'
cat $TMPFILE | grep -a -e "Genre:" | sed "s/(more)//" | sed "s/^\ *//g" | sed "s/\ *$//g" | sed "s/Genre:/Genre........:/" | sed s/\"/$QUOTECHAR/g | tr '/' '\n' | head -n $GENRENUM | tr '\n' '/' | sed "s|/$||" | sed "s/ *$//"
++ cat /glftpd/ftp-data/logs/psxc-imdb.tmp
++ grep -a -e Genre:
++ sed 's/(more)//'
++ sed 's/^\ *//g'
++ sed 's/\ *$//g'
++ sed s/Genre:/Genre........:/
++ sed 's/"/'\''/g'
++ tr / '\n'
++ head -n 99
++ tr '\n' /
++ sed 's|/$||'
++ sed 's/ *$//'
+ GENRE=Genre........: Drama / Thriller
echo $GENRE | sed "s/Genre........: *//"
++ echo Genre........: Drama / Thriller
++ sed 's/Genre........: *//'
+ GENRECLEAN=Drama / Thriller
cat $TMPFILE | grep -a -e "User\ Rating:" | sed "s/^\ *//g" | sed "s/\ *$//g" | sed "s/ [Vv][Oo][Tt][Ee] [Hh][Ee][Rr][Ee]//" | sed "s/User Rating:/User Rating..:/" | sed "s/* //g" | sed "s/_ //g" | sed s/\"/$QUOTECHAR/g | head -n 1
++ cat /glftpd/ftp-data/logs/psxc-imdb.tmp
++ grep -a -e 'User\ Rating:'
++ sed 's/^\ *//g'
++ sed 's/\ *$//g'
++ sed 's/ [Vv][Oo][Tt][Ee] [Hh][Ee][Rr][Ee]//'
++ sed 's/User Rating:/User Rating..:/'
++ sed 's/* //g'
++ sed 's/_ //g'
++ sed 's/"/'\''/g'
++ head -n 1
+ RATING=User Rating..: 7.8/10 (21,517 votes)
echo $RATING | sed "s/User Rating..: *//"
++ echo User Rating..: 7.8/10 '(21,517' 'votes)'
++ sed 's/User Rating..: *//'
+ RATINGCLEAN=7.8/10 (21,517 votes)
cat $TMPFILE | grep -a -e "User\ Rating:" | tr -cd '\*_' | tr '\*_' '#-' | head -n 1
++ cat /glftpd/ftp-data/logs/psxc-imdb.tmp
++ grep -a -e 'User\ Rating:'
++ tr -cd '\*_'
++ tr '\*_' '#-'
++ head -n 1
+ RATINGBAR=########--
echo $RATINGCLEAN | grep -a -e "[Ww][Aa][Ii][Tt]"
++ echo 7.8/10 '(21,517' 'votes)'
++ grep -a -e '[Ww][Aa][Ii][Tt]'
+ '[' '' = '' ']'
echo $RATINGCLEAN | sed "s/ [Vv][Oo][Tt][Ee][Ss]//" | tr '() ' '\n' | grep -a -v "/" | grep -a -e "[0-9]" | head -n 1
++ echo 7.8/10 '(21,517' 'votes)'
++ sed 's/ [Vv][Oo][Tt][Ee][Ss]//'
++ tr '() ' '\n'
++ grep -a -v /
++ grep -a -e '[0-9]'
++ head -n 1
+ RATINGVOTES=21,517
echo $RATINGCLEAN | grep -a -e "/" | tr '/' '\n' | head -n 1
++ echo 7.8/10 '(21,517' 'votes)'
++ grep -a -e /
++ tr / '\n'
++ head -n 1
+ RATINGSCORE=7.8
cat $TMPFILE | grep -a -e "Country:" | sed "s/^\ *//g" | sed "s/\ *$//g" | sed "s/Country:/Country......:/" | sed s/\"/$QUOTECHAR/g | tr '/' '\n' | head -n $COUNTRYNUM | tr '\n' '/' | sed "s|/$||" | sed "s/ *$//"
++ cat /glftpd/ftp-data/logs/psxc-imdb.tmp
++ grep -a -e Country:
++ sed 's/^\ *//g'
++ sed 's/\ *$//g'
++ sed s/Country:/Country......:/
++ sed 's/"/'\''/g'
++ tr / '\n'
++ head -n 99
++ tr '\n' /
++ sed 's|/$||'
++ sed 's/ *$//'
+ COUNTRY=Country......: France / USA / Mexico
echo $COUNTRY | sed "s/Country......: *//"
++ echo Country......: France / USA / Mexico
++ sed 's/Country......: *//'
+ COUNTRYCLEAN=France / USA / Mexico
cat $TMPFILE | grep -a -e "Tagline:" | sed "s/(more)//" | sed "s/^\ *//g" | sed "s/\ *$//g" | sed "s/([Mm][Oo][Rr][Ee])//" | sed "s/Tagline:/Tagline......:/" | sed s/\"/$QUOTECHAR/g | head -n 1
++ cat /glftpd/ftp-data/logs/psxc-imdb.tmp
++ grep -a -e Tagline:
++ sed 's/(more)//'
++ sed 's/^\ *//g'
++ sed 's/\ *$//g'
++ sed 's/([Mm][Oo][Rr][Ee])//'
++ sed s/Tagline:/Tagline......:/
++ sed 's/"/'\''/g'
++ head -n 1
+ TAGLINE=Tagline......: If You Want to be Understood...Listen
echo $TAGLINE | sed "s/Tagline......: *//"
++ echo Tagline......: If You Want to be Understood...Listen
++ sed 's/Tagline......: *//'
+ TAGLINECLEAN=If You Want to be Understood...Listen
cat $TMPFILE | grep -a -e "Language:" | sed "s/^\ *//g" | sed "s/\ *$//g" | sed "s/Language:/Language.....:/" | sed s/\"/$QUOTECHAR/g | tr '/' '\n' | head -n $LANGUAGENUM | tr '\n' '/' | sed "s|/$||" | sed "s/ *$//"
++ cat /glftpd/ftp-data/logs/psxc-imdb.tmp
++ grep -a -e Language:
++ sed 's/^\ *//g'
++ sed 's/\ *$//g'
++ sed s/Language:/Language.....:/
++ sed 's/"/'\''/g'
++ tr / '\n'
++ head -n 99
++ tr '\n' /
++ sed 's|/$||'
++ sed 's/ *$//'
+ LANGUAGE=Language.....: Japanese Sign Language / French / English / Spanish / Japanese / Berber / Arabic
echo $LANGUAGE | sed "s/Language.....: *//"
++ echo Language.....: Japanese Sign Language / French / English / Spanish / Japanese / Berber / Arabic
++ sed 's/Language.....: *//'
+ LANGUAGECLEAN=Japanese Sign Language / French / English / Spanish / Japanese / Berber / Arabic
cat $TMPFILE | grep -a -e "Plot\ [OS][u][tm][lm][ia][nr][ey]:" | sed "s/^\ *//g" | sed "s/\ *$//g" | sed "s/([Vv][Ii][Ee][Ww] [Tt][Rr][Aa][Ii][Ll][Ee][Rr])//" | sed "s/([Mm][Oo][Rr][Ee])//" | sed "s/Plot [OS][u][tm][lm][ia][nr][ey][:]/Plot Outline.:/" | sed s/\"/$QUOTECHAR/g | tr -s ' ' | head -n 1
++ cat /glftpd/ftp-data/logs/psxc-imdb.tmp
++ grep -a -e 'Plot\ [OS][u][tm][lm][ia][nr][ey]:'
++ sed 's/^\ *//g'
++ sed 's/\ *$//g'
++ sed 's/([Vv][Ii][Ee][Ww] [Tt][Rr][Aa][Ii][Ll][Ee][Rr])//'
++ sed 's/([Mm][Oo][Rr][Ee])//'
++ sed 's/Plot [OS][u][tm][lm][ia][nr][ey][:]/Plot Outline.:/'
++ sed 's/"/'\''/g'
++ tr -s ' '
++ head -n 1
+ PLOT=Plot Outline.: Tragedy strikes a married couple on vacation in the Moroccan desert, touching off an interlocking story involving four different families.
echo $PLOT | sed "s/Plot Outline.: *//"
++ echo Plot Outline.: Tragedy strikes a married couple on vacation in the Moroccan desert, touching off an interlocking story involving four different families.
++ sed 's/Plot Outline.: *//'
+ PLOTCLEAN=Tragedy strikes a married couple on vacation in the Moroccan desert, touching off an interlocking story involving four different families.
echo "$PLOTCLEAN" | grep -a -e "\(\ \)\ \(\ \)"
++ echo 'Tragedy strikes a married couple on vacation in the Moroccan desert, touching off an interlocking story involving four different families.'
++ grep -a -e '\(\ \)\ \(\ \)'
+ '[' '!' -z '' ']'
cat $TMPFILE | grep -a -e "Certification:" | sed "s/^\ *//g" | sed "s/\ *$//g" | sed s/\"/$QUOTECHAR/g | tr '/' '\n' | head -n $CERTIFICATIONNUM | sed "s/(.*//g" | tr '\n' '/' | sed "s|/$||" | sed "s/ *$//"
++ cat /glftpd/ftp-data/logs/psxc-imdb.tmp
++ grep -a -e Certification:
++ sed 's/^\ *//g'
++ sed 's/\ *$//g'
++ sed 's/"/'\''/g'
++ tr / '\n'
++ head -n 99
++ sed 's/(.*//g'
++ tr '\n' /
++ sed 's|/$||'
++ sed 's/ *$//'
+ CERT=Certification: Sweden:11 / Norway:15 / New Zealand:R16 / Denmark:15 / Canada:14A /Manitoba/Ontario) / Canada:13+ / Australia:MA / Germany:16 / Portugal:M/12 / Hong Kong:IIB / Canada:18A / Netherlands:16 / Ireland:16 / Switzerland:14 / Brazil:16 / Iran:18+ / Switzerland:14 / Philippines:PG-13 / USA:R / Argentina:18 / Finland:K-15 / Malaysia:18PL / South Korea:18 / Singapore:M18 / France:Unrated / UK:15 / South Africa:16
echo $CERT | sed "s/Certification: *//" | tr '/' '\n' | grep -a -e "[uU][sS][aA]" | tr -d ' ' | head -n 1
++ echo Certification: Sweden:11 / Norway:15 / New Zealand:R16 / Denmark:15 / Canada:14A '/Manitoba/Ontario)' / Canada:13+ / Australia:MA / Germany:16 / Portugal:M/12 / Hong Kong:IIB / Canada:18A / Netherlands:16 / Ireland:16 / Switzerland:14 / Brazil:16 / Iran:18+ / Switzerland:14 / Philippines:PG-13 / USA:R / Argentina:18 / Finland:K-15 / Malaysia:18PL / South Korea:18 / Singapore:M18 / France:Unrated / UK:15 / South Africa:16
++ sed 's/Certification: *//'
++ tr / '\n'
++ grep -a -e '[uU][sS][aA]'
++ head -n 1
++ tr -d ' '
+ CERTCLEAN=USA:R
cat $TMPFILE | grep -a -e "\ \.\.\.\.\ " | sed s/\"/$QUOTECHAR/g | sed "s|\ \[.*\]||g" | head -n $CASTNUM
++ cat /glftpd/ftp-data/logs/psxc-imdb.tmp
++ grep -a -e '\ \.\.\.\.\ '
++ sed 's/"/'\''/g'
++ sed 's|\ \[.*\]||g'
++ head -n 5
+ CAST= Brad Pitt .... Richard
Cate Blanchett .... Susan
Mohamed Akhzam .... Anwar
Peter Wight .... Tom
Harriet Walter .... Lilly
echo "$CAST" | sed "s/\.\.\.\..*/|/g" | tr '\n' ' ' | tr -s ' ' | sed "s/^\ *//g" | sed "s/\ *$//g" | sed "s/ |/\,/g" | sed "s/,$//"
++ echo ' Brad Pitt .... Richard
Cate Blanchett .... Susan
Mohamed Akhzam .... Anwar
Peter Wight .... Tom
Harriet Walter .... Lilly'
++ sed 's/\.\.\.\..*/|/g'
++ tr '\n' ' '
++ tr -s ' '
++ sed 's/^\ *//g'
++ sed 's/\ *$//g'
++ sed 's/ |/\,/g'
++ sed 's/,$//'
+ CASTCLEAN=Brad Pitt, Cate Blanchett, Mohamed Akhzam, Peter Wight, Harriet Walter
echo "$CAST" | head -n 1 | tr '.' '\n' | sed -e /^$/d | head -n 1 | tr -s ' ' | sed "s/^\ //g" | sed "s/\ $//g"
++ echo ' Brad Pitt .... Richard
Cate Blanchett .... Susan
Mohamed Akhzam .... Anwar
Peter Wight .... Tom
Harriet Walter .... Lilly'
++ head -n 1
++ tr . '\n'
++ sed -e '/^$/d'
++ head -n 1
++ tr -s ' '
++ sed 's/^\ //g'
++ sed 's/\ $//g'
+ CASTLEADNAME=Brad Pitt
echo "$CAST" | head -n 1 | tr '.' '\n' | sed -e /^$/d | tail -n 1 | tr -s ' ' | sed "s/^\ //g" | sed "s/\ $//g"
++ sed 's/^\ //g'
+ CASTLEADCHAR=Richard
cat $TMPFILE | grep -a -e "User Comments:" | head -n 1 | sed "s/^\ *//g" | sed "s/\ *$//g" | sed "s/([Mm][Oo][Rr][Ee])//" | sed s/\"/$QUOTECHAR/g
++ grep -a -e 'User Comments:'
++ head -n 1
++ sed 's/^\ *//g'
++ sed 's/\ *$//g'
++ sed 's/([Mm][Oo][Rr][Ee])//'
++ sed 's/"/'\''/g'
++ cat /glftpd/ftp-data/logs/psxc-imdb.tmp
+ COMMENTSHORT=User Comments: An Exhausting Film
echo $COMMENTSHORT | sed "s/User Comments: *//"
++ echo User Comments: An Exhausting Film
++ sed 's/User Comments: *//'
+ COMMENTSHORTCLEAN=An Exhausting Film
cat $TMPFILE | awk '/User Comments:$/, /Check for other user comments.$/' | sed s/\"/$QUOTECHAR/g
++ cat /glftpd/ftp-data/logs/psxc-imdb.tmp
++ awk '/User Comments:$/, /Check for other user comments.$/'
++ sed 's/"/'\''/g'
+ COMMENT= User Comments:
322 out of 555 people found the following comment useful:-
An Exhausting Film, 19 October 2006
6/10
Author: brocksilvey from United States
Alas, it appears that, based on other user comments here at IMDb, I am in the minority on this film. I found it to be tedious and exhausting, and the effort I put into sticking with it far outweighed any sense of closure I received from it.
Alejandro Gonzalez Inarritu appeared at the screening I saw and introduced his film as the final entry in a trilogy that includes 'Amores Perros' and '21 Grams.' Inarritu, in a comment that surprised me, said that his intent with this trilogy was not to focus on politics or social commentary, but rather to look at the modern family and what it means to be a father, son, mother, daughter, etc. This may have been his intention, but I don't feel that over the course of three entire films Innaritu did say much about these issues. Instead, he has painted a portrait of the world as he apparently sees it as a pretty bleak, uncaring and unforgiving place to live. I thought 'Amore Perros' was so pessimistic as to border on nihilism; '21 Grams' came closer to finding a sense of peace and redemption among the general human crappiness. 'Babel' sticks closer to the sentiments of the first film than the latter.
'Babel' is of course about communication, or more exactly miscommunication, in the modern world. It's a theme that has engaged the interest of many a filmmaker lately -- the idea that technology has made instant communication so much easier, yet people seem to be more than ever incapable of understanding one another. It's a conceit that greatly interests me, but Innaritu doesn't exploit its potential here. 'Babel' consists of a monotonous series of scenes in which people shout, storm, fight and talk over one another, always in a hurry to be understood without taking the time to understand. Very well, point taken. But Inarritu makes this point within the film's first half hour -- you only need see one or two scenes of this kind of frustrating verbal gridlock to understand what he's trying to say; after that, the frustration just mounts without any kind of pay off. People are mean to one another, some are unbelievably callous (I didn't buy for a second that the group of
tourists who accompany Brad Pitt and Cate Blanchett's characters to a remote Moroccan village after Blanchett is accidentally shot would be so uncaring as Innaritu depicts them). In Inarritu's world, all authority figures are to be justifiably feared, as they go around beating everybody up and pulling guns on innocent people. There's no nuance in Innaritu's world; he pounds his message into you. For example, he obviously feels strongly about the mistreatment of illegal immigrants, especially those from Mexico, but instead of engaging in an intelligent debate about the topic, he sets up such an implausible, not to mention one-sided, scenario in this film that you can't help but agree with him.
The biggest disappointment in 'Babel' is his failure to fully utilize a couple of wonderful actors he has assembled. Cate Blanchett is utterly wasted as the caustic American wife whose shooting sets off the chain of events. And Gael Garcia Bernal likewise gets nothing to do as a hot-headed Mexican whose attempts to run from border patrol creates a sad ending for one of the major characters. Brad Pitt does better than expected with the frenzied, frustrated husband of Blanchett. But these people have no history. We know virtually nothing about anybody in the film, yet are expected to care deeply about what happens to them. Maybe that's part of Innaritu's point -- that we're all connected to one another even if we don't know it, and that the world has become so small that there are no longer such things as strangers in it. But this is a film narrative, not real life, and you can't build a compelling one out of anonymous characters.
After '21 Grams' I thought I was warming up to Inarritu, but this film has sent me back to the detractors' camp. He certainly knows how to put a movie together, and he finds engaging ways to tell his stories. But his attitudes and approach to the modern world are so depressing and fatalistic that his films push me away rather than draw me in.
Grade: C+
Was the above comment useful to you? yes no
Check for other user comments.
echo "$COMMENT" | grep -a -e "^\ \ \ \ \ " | sed "s/^\ *//g" | sed "s/\ *$//g" | sed s/\{\}\"/$QUOTECHAR/g | tr '\n' '|'
++ echo ' User Comments:
322 out of 555 people found the following comment useful:-
An Exhausting Film, 19 October 2006
6/10
Author: brocksilvey from United States
Alas, it appears that, based on other user comments here at IMDb, I am in the minority on this film. I found it to be tedious and exhausting, and the effort I put into sticking with it far outweighed any sense of closure I received from it.
Alejandro Gonzalez Inarritu appeared at the screening I saw and introduced his film as the final entry in a trilogy that includes '\''Amores Perros'\'' and '\''21 Grams.'\'' Inarritu, in a comment that surprised me, said that his intent with this trilogy was not to focus on politics or social commentary, but rather to look at the modern family and what it means to be a father, son, mother, daughter, etc. This may have been his intention, but I don'\''t feel that over the course of three entire films Innaritu did say much about these issues. Instead, he has painted a portrait of the world as he apparently sees it as a pretty bleak, uncaring and unforgiving place to live. I thought '\''Amore Perros'\'' was so pessimistic as to border on nihilism; '\''21 Grams'\'' came closer to finding a sense of peace and redemption among the general human crappiness. '\''Babel'\'' sticks closer to the sentiments of the first film than the latter.
'\''Babel'\'' is of course about communication, or more exactly miscommunication, in the modern world. It'\''s a theme that has engaged the interest of many a filmmaker lately -- the idea that technology has made instant communication so much easier, yet people seem to be more than ever incapable of understanding one another. It'\''s a conceit that greatly interests me, but Innaritu doesn'\''t exploit its potential here. '\''Babel'\'' consists of a monotonous series of scenes in which people shout, storm, fight and talk over one another, always in a hurry to be understood without taking the time to understand. Very well, point taken. But Inarritu makes this point within the film'\''s first half hour -- you only need see one or two scenes of this kind of frustrating verbal gridlock to understand what he'\''s trying to say; after that, the frustration just mounts without any kind of pay off. People are mean to one another, some are unbelievably callous (I didn'\''t buy for a second that the group of
tourists who accompany Brad Pitt and Cate Blanchett'\''s characters to a remote Moroccan village after Blanchett is accidentally shot would be so uncaring as Innaritu depicts them). In Inarritu'\''s world, all authority figures are to be justifiably feared, as they go around beating everybody up and pulling guns on innocent people. There'\''s no nuance in Innaritu'\''s world; he pounds his message into you. For example, he obviously feels strongly about the mistreatment of illegal immigrants, especially those from Mexico, but instead of engaging in an intelligent debate about the topic, he sets up such an implausible, not to mention one-sided, scenario in this film that you can'\''t help but agree with him.
The biggest disappointment in '\''Babel'\'' is his failure to fully utilize a couple of wonderful actors he has assembled. Cate Blanchett is utterly wasted as the caustic American wife whose shooting sets off the chain of events. And Gael Garcia Bernal likewise gets nothing to do as a hot-headed Mexican whose attempts to run from border patrol creates a sad ending for one of the major characters. Brad Pitt does better than expected with the frenzied, frustrated husband of Blanchett. But these people have no history. We know virtually nothing about anybody in the film, yet are expected to care deeply about what happens to them. Maybe that'\''s part of Innaritu'\''s point -- that we'\''re all connected to one another even if we don'\''t know it, and that the world has become so small that there are no longer such things as strangers in it. But this is a film narrative, not real life, and you can'\''t build a compelling one out of anonymous characters.
After '\''21 Grams'\'' I thought I was warming up to Inarritu, but this film has sent me back to the detractors'\'' camp. He certainly knows how to put a movie together, and he finds engaging ways to tell his stories. But his attitudes and approach to the modern world are so depressing and fatalistic that his films push me away rather than draw me in.
Grade: C+
Was the above comment useful to you? yes no
Check for other user comments.'
++ grep -a -e '^\ \ \ \ \ '
++ sed 's/^\ *//g'
++ sed 's/\ *$//g'
++ sed 's/{}"/'\''/g'
++ tr '\n' '|'
+ COMMENTCLEAN=
cat $TMPFILE | grep -a -e "Runtime:" | sed "s/^\ *//g" | sed "s/\ *$//g" | sed "s/Runtime:/Runtime......:/" | sed s/\"/$QUOTECHAR/g | tr '/' '\n' | head -n $RUNTIMENUM | tr '\n' '/' | sed "s|/$||" | sed "s/ *$//"
++ cat /glftpd/ftp-data/logs/psxc-imdb.tmp
++ grep -a -e Runtime:
++ sed 's/^\ *//g'
++ sed 's/\ *$//g'
++ sed 's/"/'\''/g'
++ tr / '\n'
++ head -n 99
++ tr '\n' /
++ sed 's|/$||'
++ sed s/Runtime:/Runtime......:/
++ sed 's/ *$//'
+ RUNTIME=Runtime......: 142 min
echo $RUNTIME | sed "s/Runtime......: *//" | tr '/ ' '\n' | sed -e /^$/d | head -n 1 | tr -c -d '[:digit:]'
++ echo Runtime......: 142 min
++ sed 's/Runtime......: *//'
++ tr '/ ' '\n'
++ sed -e '/^$/d'
++ head -n 1
++ tr -c -d '[:digit:]'
+ RUNTIMECLEAN=142
+ '[' '!' -z 142 ']'
+ RUNTIMECLEAN=142 min
cat $TMPFILE | awk '/Directed by$/, /Writing credits$/' | grep -a -v "Directed by" | grep -a -v "Writing Credits" | sed "s/^\ *//g" | sed "s/\ *$//g" | head -n 1 | sed s/\"/$QUOTECHAR/g
++ cat /glftpd/ftp-data/logs/psxc-imdb.tmp
++ awk '/Directed by$/, /Writing credits$/'
++ grep -a -v 'Directed by'
++ grep -a -v 'Writing Credits'
++ sed 's/^\ *//g'
++ sed 's/\ *$//g'
++ head -n 1
++ sed 's/"/'\''/g'
+ DIRECTOR=Alejandro González Iñárritu
echo $DIRECTOR
++ echo Alejandro González Iñárritu
+ DIRECTORCLEAN=Alejandro González Iñárritu
echo "$DIRECTOR" | grep -a -e "\(\ \)\ \(\ \)"
++ echo 'Alejandro González Iñárritu'
++ grep -a -e '\(\ \)\ \(\ \)'
+ '[' '!' -z '' ']'
echo "$BOLD$TITLE$BOLD""[$COUNTRY]: $GENRE - $BOLD$RATING$BOLD"" - $IMDBURL" | sed "s/Genre........: //" | sed "s/User Rating..: //" | sed "s/Country......: *//" | tr -s ' '
++ sed 's/Genre........: //'
++ sed 's/User Rating..: //'
++ sed 's/Country......: *//'
++ tr -s ' '
++ echo 'Babel (2006) [Country......: France / USA / Mexico]: Genre........: Drama / Thriller - User Rating..: 7.8/10 (21,517 votes) - http://former.imdb.com/title/tt0449467'
+ ONELINE=Babel (2006) [France / USA / Mexico]: Drama / Thriller - 7.8/10 (21,517 votes) - http://former.imdb.com/title/tt0449467
echo "$ONELINE" | grep -a -e "\(\ \)\ \(\ \)"
++ echo 'Babel (2006) [France / USA / Mexico]: Drama / Thriller - 7.8/10 (21,517 votes) - http://former.imdb.com/title/tt0449467'
++ grep -a -e '\(\ \)\ \(\ \)'
+ '[' '!' -z '' ']'
echo "$GENRECLEAN" | grep -a -e "with other users on IMDb"
++ echo 'Drama / Thriller'
++ grep -a -e 'with other users on IMDb'
+ '[' '!' -z '' ']'
echo "$GENRECLEAN" | grep -a -e "laserdisc details"
++ echo 'Drama / Thriller'
++ grep -a -e 'laserdisc details'
+ '[' '!' -z '' ']'
echo "$GENRECLEAN" | grep -a -e "(\ )"
++ echo 'Drama / Thriller'
++ grep -a -e '(\ )'
+ '[' '!' -z '' ']'
echo "$GENRECLEAN" | grep -a -e "\.\.\."
++ echo 'Drama / Thriller'
++ grep -a -e '\.\.\.'
+ '[' '!' -z '' ']'
echo "$GENRECLEAN" | grep -a -e "Binary"
++ echo 'Drama / Thriller'
++ grep -a -e Binary
+ '[' '!' -z '' ']'
+ '[' '!' -z OK ']'
+ OUTPUTTRIES=3
+ break
+ '[' 3 -gt 3 ']'
+ '[' -z OK ']'
+ '[' -z OK ']'
+ BUSINESSURL=http://former.imdb.com/title/tt0449467/business
+ RELEASEURL=http://former.imdb.com/title/tt0449467/releaseinfo
cat $TMPFILE | grep -a -F "$BUSINESSURL"
++ cat /glftpd/ftp-data/logs/psxc-imdb.tmp
++ grep -a -F http://former.imdb.com/title/tt0449467/business
+ '[' -z '' ']'
+ '[' -z YES ']'
cat $TMPFILE | grep -a -F "$RELEASEURL"
++ cat /glftpd/ftp-data/logs/psxc-imdb.tmp
++ grep -a -F http://former.imdb.com/title/tt0449467/releaseinfo
+ '[' -z YES ']'
+ '[' '!' -z '' ']'
+ '[' '!' -z YES ']'
+ '[' 3 -gt 0 ']'
+ '[' -z YES ']'
+ wget -U 'Internet Explorer' -O /glftpd/ftp-data/logs/psxc-imdb.tmp --timeout=30 http://former.imdb.com/title/tt0449467/releaseinfo
+ '[' -z '' ']'
+ '[' 0 = 0 ']'
+ LYNXTRIES=3
lynx $LYNXFLAGS -force_html $TMPFILE
++ lynx -dump -nolist -width=1000 -hiddenlinks=ignore -connect_timeout=10 -force_html /glftpd/ftp-data/logs/psxc-imdb.tmp
+ HTMLPAGE=
IFRAME: http://servedby.advertising.com/site=710882/bnum=335311/size=468060/tags=1/optn=1
Home
Now Playing Movie/TV News My Movies DVD/Video IMDbTV Message Boards Showtimes & Tickets Game Base IMDbPro
Login | Register
Home | Top Movies | Photos | Independent Film | Browse | Help
Search [All..........] ____________________________ Submit more | tips
Questions about our new look? See our Redesign FAQ for answers.
Overview
( ) main details
( ) combined details
( ) full cast and crew
( ) company credits
( ) on television
Awards and Reviews
( ) user comments
( ) external reviews
( ) newsgroup reviews
( ) awards & nominations
( ) user ratings
( ) recommendations
( ) message board
Plot and Quotes
( ) plot summary
( ) plot keywords
(X) Amazon.com summary
( ) memorable quotes
Fun Stuff
( ) trivia
( ) goofs
( ) soundtrack listing
(X) crazy credits
(X) alternate versions
( ) movie connections
( ) FAQ
Other Info
( ) merchandising links
( ) box office & business
(o) release dates
( ) filming locations
( ) technical specs
(X) laserdisc details
( ) DVD details
( ) literature listings
( ) news articles
Promotional
( ) taglines
( ) trailers
( ) posters
( ) photo gallery
External Links
( ) showtimes
( ) official site
( ) miscellaneous
( ) photographs
( ) sound clip(s)
(X) video clip(s)
Release dates for
Babel (2006)
Country Date
France 23 May 2006 (Cannes Film Festival)
USA 1 September 2006 (Telluride Film Festival)
Canada 9 September 2006 (Toronto Film Festival)
Finland 14 September 2006 (Helsinki International Film Festival)
Brazil 21 September 2006 (Rio de Janeiro International Film Festival)
Spain 21 September 2006 (San Sebastián Film Festival)
France 12 October 2006 (Lyon Festival Hors-Écran)
Poland 13 October 2006 (Warsaw International FilmFest)
Denmark 27 October 2006
Italy 27 October 2006
Sweden 27 October 2006
USA 27 October 2006 (Los Angeles, California)
USA 27 October 2006 (New York City, New York)
Greece 2 November 2006
Netherlands 2 November 2006
UK 2 November 2006 (London Film Festival)
USA 5 November 2006 (Westwood, California) (premiere)
Latvia 10 November 2006
Poland 10 November 2006
Turkey 10 November 2006
USA 10 November 2006
France 11 November 2006 (Arras Film Festival)
Belgium 15 November 2006
France 15 November 2006
Finland 17 November 2006
Norway 17 November 2006
Morocco 7 December 2006 (Marrakech International Film Festival)
Indonesia 8 December 2006 (Jakarta International Film Festival)
Australia 14 December 2006 (limited)
Iran 16 December 2006
Germany 21 December 2006
Australia 26 December 2006
Israel 28 December 2006
India 29 December 2006
Spain 29 December 2006
Hong Kong 11 January 2007
Estonia 12 January 2007
Argentina 18 January 2007
Brazil 19 January 2007
Iceland 19 January 2007
UK 19 January 2007
Singapore 25 January 2007
Mexico 26 January 2007 (re-release)
Russia 1 February 2007
Kuwait 7 February 2007
Hungary 8 February 2007
Thailand 8 February 2007
Japan 3 March 2007
IFRAME: GoogleAd
______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
Update Information
You may report errors and omissions on this page to the IMDb database managers. They will be examined and if approved will be included in a future update. Clicking the 'Update' button will take you through a step-by-step process.
IFRAME: http://servedby.advertising.com/site=710882/bnum=348105/size=120600/tags=1/optn=1
_____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
Home | Search | Now Playing | News | My Movies | Games | Boards | Help | US Movie Showtimes | Top 250 | Register | Recommendations
Box Office | Index | Trailers | Jobs | IMDbPro.com - Free Trial | IMDb Resume
Copyright © 1990-2007 Internet Movie Database Inc.
Terms and Privacy Policy under which this service is provided to you.
An Amazon.com company. Advertise on IMDb. License our content.
+ echo '
IFRAME: http://servedby.advertising.com/site=710882/bnum=335311/size=468060/tags=1/optn=1
Home
Now Playing Movie/TV News My Movies DVD/Video IMDbTV Message Boards Showtimes & Tickets Game Base IMDbPro
Login | Register
Home | Top Movies | Photos | Independent Film | Browse | Help
Search [All..........] ____________________________ Submit more | tips
Questions about our new look? See our Redesign FAQ for answers.
Overview
( ) main details
( ) combined details
( ) full cast and crew
( ) company credits
( ) on television
Awards and Reviews
( ) user comments
( ) external reviews
( ) newsgroup reviews
( ) awards & nominations
( ) user ratings
( ) recommendations
( ) message board
Plot and Quotes
( ) plot summary
( ) plot keywords
(X) Amazon.com summary
( ) memorable quotes
Fun Stuff
( ) trivia
( ) goofs
( ) soundtrack listing
(X) crazy credits
(X) alternate versions
( ) movie connections
( ) FAQ
Other Info
( ) merchandising links
( ) box office & business
(o) release dates
( ) filming locations
( ) technical specs
(X) laserdisc details
( ) DVD details
( ) literature listings
( ) news articles
Promotional
( ) taglines
( ) trailers
( ) posters
( ) photo gallery
External Links
( ) showtimes
( ) official site
( ) miscellaneous
( ) photographs
( ) sound clip(s)
(X) video clip(s)
Release dates for
Babel (2006)
Country Date
France 23 May 2006 (Cannes Film Festival)
USA 1 September 2006 (Telluride Film Festival)
Canada 9 September 2006 (Toronto Film Festival)
Finland 14 September 2006 (Helsinki International Film Festival)
Brazil 21 September 2006 (Rio de Janeiro International Film Festival)
Spain 21 September 2006 (San Sebastián Film Festival)
France 12 October 2006 (Lyon Festival Hors-Écran)
Poland 13 October 2006 (Warsaw International FilmFest)
Denmark 27 October 2006
Italy 27 October 2006
Sweden 27 October 2006
USA 27 October 2006 (Los Angeles, California)
USA 27 October 2006 (New York City, New York)
Greece 2 November 2006
Netherlands 2 November 2006
UK 2 November 2006 (London Film Festival)
USA 5 November 2006 (Westwood, California) (premiere)
Latvia 10 November 2006
Poland 10 November 2006
Turkey 10 November 2006
USA 10 November 2006
France 11 November 2006 (Arras Film Festival)
Belgium 15 November 2006
France 15 November 2006
Finland 17 November 2006
Norway 17 November 2006
Morocco 7 December 2006 (Marrakech International Film Festival)
Indonesia 8 December 2006 (Jakarta International Film Festival)
Australia 14 December 2006 (limited)
Iran 16 December 2006
Germany 21 December 2006
Australia 26 December 2006
Israel 28 December 2006
India 29 December 2006
Spain 29 December 2006
Hong Kong 11 January 2007
Estonia 12 January 2007
Argentina 18 January 2007
Brazil 19 January 2007
Iceland 19 January 2007
UK 19 January 2007
Singapore 25 January 2007
Mexico 26 January 2007 (re-release)
Russia 1 February 2007
Kuwait 7 February 2007
Hungary 8 February 2007
Thailand 8 February 2007
Japan 3 March 2007
IFRAME: GoogleAd
______________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
Update Information
You may report errors and omissions on this page to the IMDb database managers. They will be examined and if approved will be included in a future update. Clicking the '\''Update'\'' button will take you through a step-by-step process.
IFRAME: http://servedby.advertising.com/site=710882/bnum=348105/size=120600/tags=1/optn=1
_____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________
Home | Search | Now Playing | News | My Movies | Games | Boards | Help | US Movie Showtimes | Top 250 | Register | Recommendations
Box Office | Index | Trailers | Jobs | IMDbPro.com - Free Trial | IMDb Resume
Copyright © 1990-2007 Internet Movie Database Inc.
Terms and Privacy Policy under which this service is provided to you.
An Amazon.com company. Advertise on IMDb. License our content.'
+ break
+ '[' 3 = 3 ']'
+ '[' '!' -z YES ']'
cat $TMPFILE | awk /Date$/,/endofThefile/ | grep -a -e "(" | grep -a -e "[Pp][Rr][Ee][Mm][Ii][Ee][Rr][Ee]" | head -n 1 | sed "s/^\ *//g" | sed "s/\ *$//g" | sed "s/ (/(/" | tr '(' '\n' | tr -s ' ' | head -n 1 | sed s/\"/$QUOTECHAR/g
++ cat /glftpd/ftp-data/logs/psxc-imdb.tmp
++ awk '/Date$/,/endofThefile/'
++ grep -a -e '('
++ grep -a -e '[Pp][Rr][Ee][Mm][Ii][Ee][Rr][Ee]'
++ head -n 1
++ sed 's/^\ *//g'
++ sed 's/\ *$//g'
++ sed 's/ (/(/'
++ tr '(' '\n'
++ tr -s ' '
++ sed 's/"/'\''/g'
++ head -n 1
+ PREMIERE=USA 5 November 2006
+ '[' -z 'USA 5 November 2006' ']'
echo "$PREMIERE" | tr -cd '0-9'
++ echo 'USA 5 November 2006'
++ tr -cd 0-9
+ '[' -z 52006 ']'
+ '[' '!' -z YES ']'
cat $TMPFILE | awk /Date$/,/endofThefile/ | grep -a -e "(" | grep -a -e "[Ll][Ii][Mm][Ii][Tt][Ee][Dd]" | head -n 1 | sed "s/^\ *//g" | sed "s/\ *$//g" | tr -s ' ' | sed s/\"/$QUOTECHAR/g
++ cat /glftpd/ftp-data/logs/psxc-imdb.tmp
++ awk '/Date$/,/endofThefile/'
++ grep -a -e '('
++ grep -a -e '[Ll][Ii][Mm][Ii][Tt][Ee][Dd]'
++ head -n 1
++ sed 's/^\ *//g'
++ sed 's/\ *$//g'
++ tr -s ' '
++ sed 's/"/'\''/g'
+ LIMITED=Australia 14 December 2006 (limited)
+ '[' '!' -z '============================ PSXC IMDB INFO v2.7i ============================\n' ']'
echo $BOTHEADORIG | sed "s/RELEASENAME/$BOLD$IMDBDIR$BOLD/"
++ echo
++ sed $'s/RELEASENAME/\002Test\002/'
+ BOTHEAD=
+ '[' '!' -z ']'
+ '[' '!' -z 'Alejandro González Iñárritu' ']'
+ DIRECTOR=Directed by..: Alejandro González Iñárritu
+ '[' '!' -z ']'
+ '[' '!' -z YES ']'
+ '[' '!' -z '' ']'
echo $IMDBURL | sed "s|/former.|/www.|g" | tr 'A-Z' 'a-z'
++ echo http://former.imdb.com/title/tt0449467
++ sed 's|/former.|/www.|g'
++ tr A-Z a-z
+ IMDBURL=http://www.imdb.com/title/tt0449467
+ HEADTMP=Title........: Babel (2006)
+ '[' '!' -z 'Country......: France / USA / Mexico' ']'
+ HEADTMP=Title........: Babel (2006) / Country......: France / USA / Mexico
+ '[' '!' -z 'Language.....: Japanese Sign Language / French / English / Spanish / Japanese / Berber / Arabic' ']'
+ HEADTMP=Title........: Babel (2006) / Country......: France / USA / Mexico / Language.....: Japanese Sign Language / French / English / Spanish / Japanese / Berber / Arabic
echo "$HEADTMP" | sed "s/Country......: //" | sed "s/Language.....: //" | tr -s ' '
++ echo 'Title........: Babel (2006) / Country......: France / USA / Mexico / Language.....: Japanese Sign Language / French / English / Spanish / Japanese / Berber / Arabic'
++ sed 's/Country......: //'
++ sed 's/Language.....: //'
++ tr -s ' '
+ HEAD=Title........: Babel (2006) / France / USA / Mexico / Japanese Sign Language / French / English / Spanish / Japanese / Berber / Arabic
+ '[' '!' -z '' ']'
+ '[' '!' -z 'Title........: Babel (2006) / France / USA / Mexico / Japanese Sign Language / French / English / Spanish / Japanese / Berber / Arabic' ']'
+ '[' -z YES ']'
+ '[' -z YES ']'
+ '[' '!' -z 'Directed by..: Alejandro González Iñárritu' ']'
+ '[' -z YES ']'
+ '[' '!' -z 'Genre........: Drama / Thriller' ']'
+ '[' -z YES ']'
+ '[' '!' -z 'User Rating..: 7.8/10 (21,517 votes)' ']'
+ '[' -z YES ']'
+ '[' '!' -z YES ']'
+ '[' -z YES ']'
+ '[' '!' -z 'Runtime......: 142 min' ']'
+ '[' -z YES ']'
+ '[' '!' -z '' ']'
+ '[' '!' -z 'USA 5 November 2006' ']'
+ '[' -z YES ']'
+ '[' '!' -z 'Australia 14 December 2006 (limited)' ']'
+ '[' -z YES ']'
+ '[' '!' -z 'Tagline......: If You Want to be Understood...Listen' ']'
+ '[' '!' -z 'Plot Outline.: Tragedy strikes a married couple on vacation in the Moroccan desert, touching off an interlocking story involving four different families. ' ']'
+ '[' -z YES ']'
+ '[' '!' -z 'Tagline......: If You Want to be Understood...Listen' ']'
+ '[' '!' '' = NONE ']'
+ '[' -z YES ']'
+ '[' '!' -z 'Plot Outline.: Tragedy strikes a married couple on vacation in the Moroccan desert, touching off an interlocking story involving four different families. ' ']'
+ '[' '!' '' = NONE ']'
+ '[' -z YES ']'
+ '[' '!' -z YES ']'
+ '[' '!' 'User Comments: An Exhausting Film ' = 'User Comments:' ']'
+ '[' -z YES ']'
+ '[' '!' -z YES ']'
+ '[' -z MYOWN ']'
+ '[' MYOWN = MYOWN ']'
+ MYOWNPAIRS=%imdbdirname|IMDBDIR %imdburl|IMDBURL %imdbtitle|TITLE %imdbgenre|GENRECLEAN %imdbrating|RATINGCLEAN %imdbcountry|COUNTRYCLEAN %imdblanguage|LANGUAGECLEAN %imdbcertification|CERTCLEAN %imdbruntime|RUNTIMECLEAN %imdbdirector|DIRECTORCLEAN %imdbbusinessdata|BUSINESSSHORT %imdbpremiereinfo|PREMIERE %imdblimitedinfo|LIMITED %imdbvotes|RATINGVOTES %imdbscore|RATINGSCORE %imdbname|TITLENAME %imdbyear|TITLEYEAR %imdbnumscreens|BUSINESSSCREENS %imdbislimited|ISLIMITED %imdbcastleadname|CASTLEADNAME %imdbcastleadchar|CASTLEADCHAR %imdbtagline|TAGLINECLEAN %imdbplot|PLOTCLEAN %imdbbar|RATINGBAR %imdbcasting|CASTCLEAN %imdbcommentshort|COMMENTSHORTCLEAN %newline|NEWLINE %bold|BOLD
+ MYOWNFORMAT1=%boldIMDB:%bold %bold%imdbname%bold (%imdburl ), a %imdbdirector movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in %imdbpremiereinfo, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot
echo "$OWNPAIR" | cut -d '|' -f 1
++ echo '%imdbdirname|IMDBDIR'
++ cut -d '|' -f 1
+ MYOWNSTRING=%imdbdirname
echo "$OWNPAIR" | cut -d '|' -f 2
++ echo '%imdbdirname|IMDBDIR'
++ cut -d '|' -f 2
+ MYOWNVAR=IMDBDIR
+ '[' '!' -z Test ']'
echo "${!MYOWNVAR}" | tr '\&' '`'
++ echo Test
++ tr '\&' '`'
+ MYTEMPVAR=Test
echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYTEMPVAR^g" | tr '`' '\&'
++ echo '%boldIMDB:%bold %bold%imdbname%bold (%imdburl ), a %imdbdirector movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in %imdbpremiereinfo, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot'
++ sed 's^%imdbdirname^Test^g'
++ tr '`' '\&'
+ MYOWNFORMAT1=%boldIMDB:%bold %bold%imdbname%bold (%imdburl ), a %imdbdirector movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in %imdbpremiereinfo, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot
echo "$OWNPAIR" | cut -d '|' -f 1
++ echo '%imdburl|IMDBURL'
++ cut -d '|' -f 1
+ MYOWNSTRING=%imdburl
echo "$OWNPAIR" | cut -d '|' -f 2
++ echo '%imdburl|IMDBURL'
++ cut -d '|' -f 2
+ MYOWNVAR=IMDBURL
+ '[' '!' -z http://www.imdb.com/title/tt0449467 ']'
echo "${!MYOWNVAR}" | tr '\&' '`'
++ echo http://www.imdb.com/title/tt0449467
++ tr '\&' '`'
+ MYTEMPVAR=http://www.imdb.com/title/tt0449467
echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYTEMPVAR^g" | tr '`' '\&'
++ echo '%boldIMDB:%bold %bold%imdbname%bold (%imdburl ), a %imdbdirector movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in %imdbpremiereinfo, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot'
++ sed 's^%imdburl^http://www.imdb.com/title/tt0449467^g'
++ tr '`' '\&'
+ MYOWNFORMAT1=%boldIMDB:%bold %bold%imdbname%bold (http://www.imdb.com/title/tt0449467 ), a %imdbdirector movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in %imdbpremiereinfo, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot
echo "$OWNPAIR" | cut -d '|' -f 1
++ echo '%imdbtitle|TITLE'
++ cut -d '|' -f 1
+ MYOWNSTRING=%imdbtitle
echo "$OWNPAIR" | cut -d '|' -f 2
++ echo '%imdbtitle|TITLE'
++ cut -d '|' -f 2
+ MYOWNVAR=TITLE
+ '[' '!' -z 'Babel (2006) ' ']'
echo "${!MYOWNVAR}" | tr '\&' '`'
++ echo 'Babel (2006) '
++ tr '\&' '`'
+ MYTEMPVAR=Babel (2006)
echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYTEMPVAR^g" | tr '`' '\&'
++ echo '%boldIMDB:%bold %bold%imdbname%bold (http://www.imdb.com/title/tt0449467 ), a %imdbdirector movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in %imdbpremiereinfo, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot'
++ sed 's^%imdbtitle^Babel (2006) ^g'
++ tr '`' '\&'
+ MYOWNFORMAT1=%boldIMDB:%bold %bold%imdbname%bold (http://www.imdb.com/title/tt0449467 ), a %imdbdirector movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in %imdbpremiereinfo, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot
echo "$OWNPAIR" | cut -d '|' -f 1
++ echo '%imdbgenre|GENRECLEAN'
++ cut -d '|' -f 1
+ MYOWNSTRING=%imdbgenre
echo "$OWNPAIR" | cut -d '|' -f 2
++ echo '%imdbgenre|GENRECLEAN'
++ cut -d '|' -f 2
+ MYOWNVAR=GENRECLEAN
+ '[' '!' -z 'Drama / Thriller' ']'
echo "${!MYOWNVAR}" | tr '\&' '`'
++ echo 'Drama / Thriller'
++ tr '\&' '`'
+ MYTEMPVAR=Drama / Thriller
echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYTEMPVAR^g" | tr '`' '\&'
++ echo '%boldIMDB:%bold %bold%imdbname%bold (http://www.imdb.com/title/tt0449467 ), a %imdbdirector movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in %imdbpremiereinfo, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot'
++ sed 's^%imdbgenre^Drama / Thriller^g'
++ tr '`' '\&'
+ MYOWNFORMAT1=%boldIMDB:%bold %bold%imdbname%bold (http://www.imdb.com/title/tt0449467 ), a %imdbdirector movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in %imdbpremiereinfo, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot
echo "$OWNPAIR" | cut -d '|' -f 1
++ echo '%imdbrating|RATINGCLEAN'
++ cut -d '|' -f 1
+ MYOWNSTRING=%imdbrating
echo "$OWNPAIR" | cut -d '|' -f 2
++ echo '%imdbrating|RATINGCLEAN'
++ cut -d '|' -f 2
+ MYOWNVAR=RATINGCLEAN
+ '[' '!' -z '7.8/10 (21,517 votes)' ']'
echo "${!MYOWNVAR}" | tr '\&' '`'
++ echo '7.8/10 (21,517 votes)'
++ tr '\&' '`'
+ MYTEMPVAR=7.8/10 (21,517 votes)
echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYTEMPVAR^g" | tr '`' '\&'
++ echo '%boldIMDB:%bold %bold%imdbname%bold (http://www.imdb.com/title/tt0449467 ), a %imdbdirector movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in %imdbpremiereinfo, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot'
++ sed 's^%imdbrating^7.8/10 (21,517 votes)^g'
++ tr '`' '\&'
+ MYOWNFORMAT1=%boldIMDB:%bold %bold%imdbname%bold (http://www.imdb.com/title/tt0449467 ), a %imdbdirector movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in %imdbpremiereinfo, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot
echo "$OWNPAIR" | cut -d '|' -f 1
++ echo '%imdbcountry|COUNTRYCLEAN'
++ cut -d '|' -f 1
+ MYOWNSTRING=%imdbcountry
echo "$OWNPAIR" | cut -d '|' -f 2
++ echo '%imdbcountry|COUNTRYCLEAN'
++ cut -d '|' -f 2
+ MYOWNVAR=COUNTRYCLEAN
+ '[' '!' -z 'France / USA / Mexico' ']'
echo "${!MYOWNVAR}" | tr '\&' '`'
++ echo 'France / USA / Mexico'
++ tr '\&' '`'
+ MYTEMPVAR=France / USA / Mexico
echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYTEMPVAR^g" | tr '`' '\&'
++ echo '%boldIMDB:%bold %bold%imdbname%bold (http://www.imdb.com/title/tt0449467 ), a %imdbdirector movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in %imdbpremiereinfo, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot'
++ sed 's^%imdbcountry^France / USA / Mexico^g'
++ tr '`' '\&'
+ MYOWNFORMAT1=%boldIMDB:%bold %bold%imdbname%bold (http://www.imdb.com/title/tt0449467 ), a %imdbdirector movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in %imdbpremiereinfo, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot
echo "$OWNPAIR" | cut -d '|' -f 1
++ echo '%imdblanguage|LANGUAGECLEAN'
++ cut -d '|' -f 1
+ MYOWNSTRING=%imdblanguage
echo "$OWNPAIR" | cut -d '|' -f 2
++ echo '%imdblanguage|LANGUAGECLEAN'
++ cut -d '|' -f 2
+ MYOWNVAR=LANGUAGECLEAN
+ '[' '!' -z 'Japanese Sign Language / French / English / Spanish / Japanese / Berber / Arabic' ']'
echo "${!MYOWNVAR}" | tr '\&' '`'
++ echo 'Japanese Sign Language / French / English / Spanish / Japanese / Berber / Arabic'
++ tr '\&' '`'
+ MYTEMPVAR=Japanese Sign Language / French / English / Spanish / Japanese / Berber / Arabic
echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYTEMPVAR^g" | tr '`' '\&'
++ echo '%boldIMDB:%bold %bold%imdbname%bold (http://www.imdb.com/title/tt0449467 ), a %imdbdirector movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in %imdbpremiereinfo, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot'
++ sed 's^%imdblanguage^Japanese Sign Language / French / English / Spanish / Japanese / Berber / Arabic^g'
++ tr '`' '\&'
+ MYOWNFORMAT1=%boldIMDB:%bold %bold%imdbname%bold (http://www.imdb.com/title/tt0449467 ), a %imdbdirector movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in %imdbpremiereinfo, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot
echo "$OWNPAIR" | cut -d '|' -f 1
++ echo '%imdbcertification|CERTCLEAN'
++ cut -d '|' -f 1
+ MYOWNSTRING=%imdbcertification
echo "$OWNPAIR" | cut -d '|' -f 2
++ echo '%imdbcertification|CERTCLEAN'
++ cut -d '|' -f 2
+ MYOWNVAR=CERTCLEAN
+ '[' '!' -z USA:R ']'
echo "${!MYOWNVAR}" | tr '\&' '`'
++ echo USA:R
++ tr '\&' '`'
+ MYTEMPVAR=USA:R
echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYTEMPVAR^g" | tr '`' '\&'
++ echo '%boldIMDB:%bold %bold%imdbname%bold (http://www.imdb.com/title/tt0449467 ), a %imdbdirector movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in %imdbpremiereinfo, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot'
++ sed 's^%imdbcertification^USA:R^g'
++ tr '`' '\&'
+ MYOWNFORMAT1=%boldIMDB:%bold %bold%imdbname%bold (http://www.imdb.com/title/tt0449467 ), a %imdbdirector movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in %imdbpremiereinfo, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot
echo "$OWNPAIR" | cut -d '|' -f 1
++ echo '%imdbruntime|RUNTIMECLEAN'
++ cut -d '|' -f 1
+ MYOWNSTRING=%imdbruntime
echo "$OWNPAIR" | cut -d '|' -f 2
++ echo '%imdbruntime|RUNTIMECLEAN'
++ cut -d '|' -f 2
+ MYOWNVAR=RUNTIMECLEAN
+ '[' '!' -z '142 min' ']'
echo "${!MYOWNVAR}" | tr '\&' '`'
++ echo '142 min'
++ tr '\&' '`'
+ MYTEMPVAR=142 min
echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYTEMPVAR^g" | tr '`' '\&'
++ echo '%boldIMDB:%bold %bold%imdbname%bold (http://www.imdb.com/title/tt0449467 ), a %imdbdirector movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in %imdbpremiereinfo, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot'
++ sed 's^%imdbruntime^142 min^g'
++ tr '`' '\&'
+ MYOWNFORMAT1=%boldIMDB:%bold %bold%imdbname%bold (http://www.imdb.com/title/tt0449467 ), a %imdbdirector movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in %imdbpremiereinfo, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot
echo "$OWNPAIR" | cut -d '|' -f 1
++ echo '%imdbdirector|DIRECTORCLEAN'
++ cut -d '|' -f 1
+ MYOWNSTRING=%imdbdirector
echo "$OWNPAIR" | cut -d '|' -f 2
++ echo '%imdbdirector|DIRECTORCLEAN'
++ cut -d '|' -f 2
+ MYOWNVAR=DIRECTORCLEAN
+ '[' '!' -z 'Alejandro González Iñárritu' ']'
echo "${!MYOWNVAR}" | tr '\&' '`'
++ echo 'Alejandro González Iñárritu'
++ tr '\&' '`'
+ MYTEMPVAR=Alejandro González Iñárritu
echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYTEMPVAR^g" | tr '`' '\&'
++ echo '%boldIMDB:%bold %bold%imdbname%bold (http://www.imdb.com/title/tt0449467 ), a %imdbdirector movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in %imdbpremiereinfo, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot'
++ sed 's^%imdbdirector^Alejandro González Iñárritu^g'
++ tr '`' '\&'
+ MYOWNFORMAT1=%boldIMDB:%bold %bold%imdbname%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in %imdbpremiereinfo, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot
echo "$OWNPAIR" | cut -d '|' -f 1
++ echo '%imdbbusinessdata|BUSINESSSHORT'
++ cut -d '|' -f 1
+ MYOWNSTRING=%imdbbusinessdata
echo "$OWNPAIR" | cut -d '|' -f 2
++ echo '%imdbbusinessdata|BUSINESSSHORT'
++ cut -d '|' -f 2
+ MYOWNVAR=BUSINESSSHORT
+ '[' '!' -z '' ']'
echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYOWNEMPTY^g"
++ echo '%boldIMDB:%bold %bold%imdbname%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in %imdbpremiereinfo, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot'
++ sed 's^%imdbbusinessdata^N/A^g'
+ MYOWNFORMAT1=%boldIMDB:%bold %bold%imdbname%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in %imdbpremiereinfo, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot
echo "$OWNPAIR" | cut -d '|' -f 1
++ echo '%imdbpremiereinfo|PREMIERE'
++ cut -d '|' -f 1
+ MYOWNSTRING=%imdbpremiereinfo
echo "$OWNPAIR" | cut -d '|' -f 2
++ echo '%imdbpremiereinfo|PREMIERE'
++ cut -d '|' -f 2
+ MYOWNVAR=PREMIERE
+ '[' '!' -z 'USA 5 November 2006' ']'
echo "${!MYOWNVAR}" | tr '\&' '`'
++ echo 'USA 5 November 2006'
++ tr '\&' '`'
+ MYTEMPVAR=USA 5 November 2006
echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYTEMPVAR^g" | tr '`' '\&'
++ echo '%boldIMDB:%bold %bold%imdbname%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in %imdbpremiereinfo, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot'
++ sed 's^%imdbpremiereinfo^USA 5 November 2006^g'
++ tr '`' '\&'
+ MYOWNFORMAT1=%boldIMDB:%bold %bold%imdbname%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in USA 5 November 2006, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot
echo "$OWNPAIR" | cut -d '|' -f 1
++ echo '%imdblimitedinfo|LIMITED'
++ cut -d '|' -f 1
+ MYOWNSTRING=%imdblimitedinfo
echo "$OWNPAIR" | cut -d '|' -f 2
++ echo '%imdblimitedinfo|LIMITED'
++ cut -d '|' -f 2
+ MYOWNVAR=LIMITED
+ '[' '!' -z 'Australia 14 December 2006 (limited)' ']'
echo "${!MYOWNVAR}" | tr '\&' '`'
++ echo 'Australia 14 December 2006 (limited)'
++ tr '\&' '`'
+ MYTEMPVAR=Australia 14 December 2006 (limited)
echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYTEMPVAR^g" | tr '`' '\&'
++ echo '%boldIMDB:%bold %bold%imdbname%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in USA 5 November 2006, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot'
++ sed 's^%imdblimitedinfo^Australia 14 December 2006 (limited)^g'
++ tr '`' '\&'
+ MYOWNFORMAT1=%boldIMDB:%bold %bold%imdbname%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in USA 5 November 2006, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot
echo "$OWNPAIR" | cut -d '|' -f 1
++ echo '%imdbvotes|RATINGVOTES'
++ cut -d '|' -f 1
+ MYOWNSTRING=%imdbvotes
echo "$OWNPAIR" | cut -d '|' -f 2
++ echo '%imdbvotes|RATINGVOTES'
++ cut -d '|' -f 2
+ MYOWNVAR=RATINGVOTES
+ '[' '!' -z 21,517 ']'
echo "${!MYOWNVAR}" | tr '\&' '`'
++ echo 21,517
++ tr '\&' '`'
+ MYTEMPVAR=21,517
echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYTEMPVAR^g" | tr '`' '\&'
++ echo '%boldIMDB:%bold %bold%imdbname%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold%imdbscore of 10%bold (%imdbvotes people voted). It premiered in USA 5 November 2006, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot'
++ sed 's^%imdbvotes^21,517^g'
++ tr '`' '\&'
+ MYOWNFORMAT1=%boldIMDB:%bold %bold%imdbname%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold%imdbscore of 10%bold (21,517 people voted). It premiered in USA 5 November 2006, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot
echo "$OWNPAIR" | cut -d '|' -f 1
++ echo '%imdbscore|RATINGSCORE'
++ cut -d '|' -f 1
+ MYOWNSTRING=%imdbscore
echo "$OWNPAIR" | cut -d '|' -f 2
++ echo '%imdbscore|RATINGSCORE'
++ cut -d '|' -f 2
+ MYOWNVAR=RATINGSCORE
+ '[' '!' -z 7.8 ']'
echo "${!MYOWNVAR}" | tr '\&' '`'
++ echo 7.8
++ tr '\&' '`'
+ MYTEMPVAR=7.8
echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYTEMPVAR^g" | tr '`' '\&'
++ echo '%boldIMDB:%bold %bold%imdbname%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold%imdbscore of 10%bold (21,517 people voted). It premiered in USA 5 November 2006, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot'
++ sed 's^%imdbscore^7.8^g'
++ tr '`' '\&'
+ MYOWNFORMAT1=%boldIMDB:%bold %bold%imdbname%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold7.8 of 10%bold (21,517 people voted). It premiered in USA 5 November 2006, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot
echo "$OWNPAIR" | cut -d '|' -f 1
++ echo '%imdbname|TITLENAME'
++ cut -d '|' -f 1
+ MYOWNSTRING=%imdbname
echo "$OWNPAIR" | cut -d '|' -f 2
++ echo '%imdbname|TITLENAME'
++ cut -d '|' -f 2
+ MYOWNVAR=TITLENAME
+ '[' '!' -z Babel ']'
echo "${!MYOWNVAR}" | tr '\&' '`'
++ echo Babel
++ tr '\&' '`'
+ MYTEMPVAR=Babel
echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYTEMPVAR^g" | tr '`' '\&'
++ echo '%boldIMDB:%bold %bold%imdbname%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold7.8 of 10%bold (21,517 people voted). It premiered in USA 5 November 2006, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %bold%imdbname%bold plot summary: %imdbplot'
++ sed 's^%imdbname^Babel^g'
++ tr '`' '\&'
+ MYOWNFORMAT1=%boldIMDB:%bold %boldBabel%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold7.8 of 10%bold (21,517 people voted). It premiered in USA 5 November 2006, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %boldBabel%bold plot summary: %imdbplot
echo "$OWNPAIR" | cut -d '|' -f 1
++ echo '%imdbyear|TITLEYEAR'
++ cut -d '|' -f 1
+ MYOWNSTRING=%imdbyear
echo "$OWNPAIR" | cut -d '|' -f 2
++ echo '%imdbyear|TITLEYEAR'
++ cut -d '|' -f 2
+ MYOWNVAR=TITLEYEAR
+ '[' '!' -z 2006 ']'
echo "${!MYOWNVAR}" | tr '\&' '`'
++ echo 2006
++ tr '\&' '`'
+ MYTEMPVAR=2006
echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYTEMPVAR^g" | tr '`' '\&'
++ echo '%boldIMDB:%bold %boldBabel%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold7.8 of 10%bold (21,517 people voted). It premiered in USA 5 November 2006, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %boldBabel%bold plot summary: %imdbplot'
++ sed 's^%imdbyear^2006^g'
++ tr '`' '\&'
+ MYOWNFORMAT1=%boldIMDB:%bold %boldBabel%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold7.8 of 10%bold (21,517 people voted). It premiered in USA 5 November 2006, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %boldBabel%bold plot summary: %imdbplot
echo "$OWNPAIR" | cut -d '|' -f 1
++ echo '%imdbnumscreens|BUSINESSSCREENS'
++ cut -d '|' -f 1
+ MYOWNSTRING=%imdbnumscreens
echo "$OWNPAIR" | cut -d '|' -f 2
++ echo '%imdbnumscreens|BUSINESSSCREENS'
++ cut -d '|' -f 2
+ MYOWNVAR=BUSINESSSCREENS
+ '[' '!' -z '' ']'
echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYOWNEMPTY^g"
++ echo '%boldIMDB:%bold %boldBabel%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold7.8 of 10%bold (21,517 people voted). It premiered in USA 5 November 2006, with %bold%imdbnumscreens screens%bold on the opening weekend.%newline%boldIMDB:%bold %boldBabel%bold plot summary: %imdbplot'
++ sed 's^%imdbnumscreens^N/A^g'
+ MYOWNFORMAT1=%boldIMDB:%bold %boldBabel%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold7.8 of 10%bold (21,517 people voted). It premiered in USA 5 November 2006, with %boldN/A screens%bold on the opening weekend.%newline%boldIMDB:%bold %boldBabel%bold plot summary: %imdbplot
echo "$OWNPAIR" | cut -d '|' -f 1
++ echo '%imdbislimited|ISLIMITED'
++ cut -d '|' -f 1
+ MYOWNSTRING=%imdbislimited
echo "$OWNPAIR" | cut -d '|' -f 2
++ echo '%imdbislimited|ISLIMITED'
++ cut -d '|' -f 2
+ MYOWNVAR=ISLIMITED
+ '[' '!' -z '' ']'
echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYOWNEMPTY^g"
++ echo '%boldIMDB:%bold %boldBabel%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold7.8 of 10%bold (21,517 people voted). It premiered in USA 5 November 2006, with %boldN/A screens%bold on the opening weekend.%newline%boldIMDB:%bold %boldBabel%bold plot summary: %imdbplot'
++ sed 's^%imdbislimited^N/A^g'
+ MYOWNFORMAT1=%boldIMDB:%bold %boldBabel%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold7.8 of 10%bold (21,517 people voted). It premiered in USA 5 November 2006, with %boldN/A screens%bold on the opening weekend.%newline%boldIMDB:%bold %boldBabel%bold plot summary: %imdbplot
echo "$OWNPAIR" | cut -d '|' -f 1
++ echo '%imdbcastleadname|CASTLEADNAME'
++ cut -d '|' -f 1
+ MYOWNSTRING=%imdbcastleadname
echo "$OWNPAIR" | cut -d '|' -f 2
++ echo '%imdbcastleadname|CASTLEADNAME'
++ cut -d '|' -f 2
+ MYOWNVAR=CASTLEADNAME
+ '[' '!' -z 'Brad Pitt' ']'
echo "${!MYOWNVAR}" | tr '\&' '`'
++ echo 'Brad Pitt'
++ tr '\&' '`'
+ MYTEMPVAR=Brad Pitt
echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYTEMPVAR^g" | tr '`' '\&'
++ echo '%boldIMDB:%bold %boldBabel%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold7.8 of 10%bold (21,517 people voted). It premiered in USA 5 November 2006, with %boldN/A screens%bold on the opening weekend.%newline%boldIMDB:%bold %boldBabel%bold plot summary: %imdbplot'
++ sed 's^%imdbcastleadname^Brad Pitt^g'
++ tr '`' '\&'
+ MYOWNFORMAT1=%boldIMDB:%bold %boldBabel%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold7.8 of 10%bold (21,517 people voted). It premiered in USA 5 November 2006, with %boldN/A screens%bold on the opening weekend.%newline%boldIMDB:%bold %boldBabel%bold plot summary: %imdbplot
echo "$OWNPAIR" | cut -d '|' -f 1
++ echo '%imdbcastleadchar|CASTLEADCHAR'
++ cut -d '|' -f 1
+ MYOWNSTRING=%imdbcastleadchar
echo "$OWNPAIR" | cut -d '|' -f 2
++ echo '%imdbcastleadchar|CASTLEADCHAR'
++ cut -d '|' -f 2
+ MYOWNVAR=CASTLEADCHAR
+ '[' '!' -z Richard ']'
echo "${!MYOWNVAR}" | tr '\&' '`'
++ echo Richard
++ tr '\&' '`'
+ MYTEMPVAR=Richard
echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYTEMPVAR^g" | tr '`' '\&'
++ echo '%boldIMDB:%bold %boldBabel%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold7.8 of 10%bold (21,517 people voted). It premiered in USA 5 November 2006, with %boldN/A screens%bold on the opening weekend.%newline%boldIMDB:%bold %boldBabel%bold plot summary: %imdbplot'
++ sed 's^%imdbcastleadchar^Richard^g'
++ tr '`' '\&'
+ MYOWNFORMAT1=%boldIMDB:%bold %boldBabel%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold7.8 of 10%bold (21,517 people voted). It premiered in USA 5 November 2006, with %boldN/A screens%bold on the opening weekend.%newline%boldIMDB:%bold %boldBabel%bold plot summary: %imdbplot
echo "$OWNPAIR" | cut -d '|' -f 1
++ echo '%imdbtagline|TAGLINECLEAN'
++ cut -d '|' -f 1
+ MYOWNSTRING=%imdbtagline
echo "$OWNPAIR" | cut -d '|' -f 2
++ echo '%imdbtagline|TAGLINECLEAN'
++ cut -d '|' -f 2
+ MYOWNVAR=TAGLINECLEAN
+ '[' '!' -z 'If You Want to be Understood...Listen' ']'
echo "${!MYOWNVAR}" | tr '\&' '`'
++ echo 'If You Want to be Understood...Listen'
++ tr '\&' '`'
+ MYTEMPVAR=If You Want to be Understood...Listen
echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYTEMPVAR^g" | tr '`' '\&'
++ echo '%boldIMDB:%bold %boldBabel%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold7.8 of 10%bold (21,517 people voted). It premiered in USA 5 November 2006, with %boldN/A screens%bold on the opening weekend.%newline%boldIMDB:%bold %boldBabel%bold plot summary: %imdbplot'
++ sed 's^%imdbtagline^If You Want to be Understood...Listen^g'
++ tr '`' '\&'
+ MYOWNFORMAT1=%boldIMDB:%bold %boldBabel%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold7.8 of 10%bold (21,517 people voted). It premiered in USA 5 November 2006, with %boldN/A screens%bold on the opening weekend.%newline%boldIMDB:%bold %boldBabel%bold plot summary: %imdbplot
echo "$OWNPAIR" | cut -d '|' -f 1
++ echo '%imdbplot|PLOTCLEAN'
++ cut -d '|' -f 1
+ MYOWNSTRING=%imdbplot
echo "$OWNPAIR" | cut -d '|' -f 2
++ echo '%imdbplot|PLOTCLEAN'
++ cut -d '|' -f 2
+ MYOWNVAR=PLOTCLEAN
+ '[' '!' -z 'Tragedy strikes a married couple on vacation in the Moroccan desert, touching off an interlocking story involving four different families.' ']'
echo "${!MYOWNVAR}" | tr '\&' '`'
++ echo 'Tragedy strikes a married couple on vacation in the Moroccan desert, touching off an interlocking story involving four different families.'
++ tr '\&' '`'
+ MYTEMPVAR=Tragedy strikes a married couple on vacation in the Moroccan desert, touching off an interlocking story involving four different families.
echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYTEMPVAR^g" | tr '`' '\&'
++ echo '%boldIMDB:%bold %boldBabel%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold7.8 of 10%bold (21,517 people voted). It premiered in USA 5 November 2006, with %boldN/A screens%bold on the opening weekend.%newline%boldIMDB:%bold %boldBabel%bold plot summary: %imdbplot'
++ sed 's^%imdbplot^Tragedy strikes a married couple on vacation in the Moroccan desert, touching off an interlocking story involving four different families.^g'
++ tr '`' '\&'
+ MYOWNFORMAT1=%boldIMDB:%bold %boldBabel%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold7.8 of 10%bold (21,517 people voted). It premiered in USA 5 November 2006, with %boldN/A screens%bold on the opening weekend.%newline%boldIMDB:%bold %boldBabel%bold plot summary: Tragedy strikes a married couple on vacation in the Moroccan desert, touching off an interlocking story involving four different families.
echo "$OWNPAIR" | cut -d '|' -f 1
++ echo '%imdbbar|RATINGBAR'
++ cut -d '|' -f 1
+ MYOWNSTRING=%imdbbar
echo "$OWNPAIR" | cut -d '|' -f 2
++ echo '%imdbbar|RATINGBAR'
++ cut -d '|' -f 2
+ MYOWNVAR=RATINGBAR
+ '[' '!' -z '########--' ']'
echo "${!MYOWNVAR}" | tr '\&' '`'
++ echo '########--'
++ tr '\&' '`'
+ MYTEMPVAR=########--
echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYTEMPVAR^g" | tr '`' '\&'
++ echo '%boldIMDB:%bold %boldBabel%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold7.8 of 10%bold (21,517 people voted). It premiered in USA 5 November 2006, with %boldN/A screens%bold on the opening weekend.%newline%boldIMDB:%bold %boldBabel%bold plot summary: Tragedy strikes a married couple on vacation in the Moroccan desert, touching off an interlocking story involving four different families.'
++ sed 's^%imdbbar^########--^g'
++ tr '`' '\&'
+ MYOWNFORMAT1=%boldIMDB:%bold %boldBabel%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold7.8 of 10%bold (21,517 people voted). It premiered in USA 5 November 2006, with %boldN/A screens%bold on the opening weekend.%newline%boldIMDB:%bold %boldBabel%bold plot summary: Tragedy strikes a married couple on vacation in the Moroccan desert, touching off an interlocking story involving four different families.
echo "$OWNPAIR" | cut -d '|' -f 1
++ echo '%imdbcasting|CASTCLEAN'
++ cut -d '|' -f 1
+ MYOWNSTRING=%imdbcasting
echo "$OWNPAIR" | cut -d '|' -f 2
++ echo '%imdbcasting|CASTCLEAN'
++ cut -d '|' -f 2
+ MYOWNVAR=CASTCLEAN
+ '[' '!' -z 'Brad Pitt, Cate Blanchett, Mohamed Akhzam, Peter Wight, Harriet Walter' ']'
echo "${!MYOWNVAR}" | tr '\&' '`'
++ echo 'Brad Pitt, Cate Blanchett, Mohamed Akhzam, Peter Wight, Harriet Walter'
++ tr '\&' '`'
+ MYTEMPVAR=Brad Pitt, Cate Blanchett, Mohamed Akhzam, Peter Wight, Harriet Walter
echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYTEMPVAR^g" | tr '`' '\&'
++ echo '%boldIMDB:%bold %boldBabel%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold7.8 of 10%bold (21,517 people voted). It premiered in USA 5 November 2006, with %boldN/A screens%bold on the opening weekend.%newline%boldIMDB:%bold %boldBabel%bold plot summary: Tragedy strikes a married couple on vacation in the Moroccan desert, touching off an interlocking story involving four different families.'
++ sed 's^%imdbcasting^Brad Pitt, Cate Blanchett, Mohamed Akhzam, Peter Wight, Harriet Walter^g'
++ tr '`' '\&'
+ MYOWNFORMAT1=%boldIMDB:%bold %boldBabel%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold7.8 of 10%bold (21,517 people voted). It premiered in USA 5 November 2006, with %boldN/A screens%bold on the opening weekend.%newline%boldIMDB:%bold %boldBabel%bold plot summary: Tragedy strikes a married couple on vacation in the Moroccan desert, touching off an interlocking story involving four different families.
echo "$OWNPAIR" | cut -d '|' -f 1
++ echo '%imdbcommentshort|COMMENTSHORTCLEAN'
++ cut -d '|' -f 1
+ MYOWNSTRING=%imdbcommentshort
echo "$OWNPAIR" | cut -d '|' -f 2
++ echo '%imdbcommentshort|COMMENTSHORTCLEAN'
++ cut -d '|' -f 2
+ MYOWNVAR=COMMENTSHORTCLEAN
+ '[' '!' -z 'An Exhausting Film' ']'
echo "${!MYOWNVAR}" | tr '\&' '`'
++ echo 'An Exhausting Film'
++ tr '\&' '`'
+ MYTEMPVAR=An Exhausting Film
echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYTEMPVAR^g" | tr '`' '\&'
++ echo '%boldIMDB:%bold %boldBabel%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold7.8 of 10%bold (21,517 people voted). It premiered in USA 5 November 2006, with %boldN/A screens%bold on the opening weekend.%newline%boldIMDB:%bold %boldBabel%bold plot summary: Tragedy strikes a married couple on vacation in the Moroccan desert, touching off an interlocking story involving four different families.'
++ sed 's^%imdbcommentshort^An Exhausting Film^g'
++ tr '`' '\&'
+ MYOWNFORMAT1=%boldIMDB:%bold %boldBabel%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold7.8 of 10%bold (21,517 people voted). It premiered in USA 5 November 2006, with %boldN/A screens%bold on the opening weekend.%newline%boldIMDB:%bold %boldBabel%bold plot summary: Tragedy strikes a married couple on vacation in the Moroccan desert, touching off an interlocking story involving four different families.
echo "$OWNPAIR" | cut -d '|' -f 1
++ echo '%newline|NEWLINE'
++ cut -d '|' -f 1
+ MYOWNSTRING=%newline
echo "$OWNPAIR" | cut -d '|' -f 2
++ echo '%newline|NEWLINE'
++ cut -d '|' -f 2
+ MYOWNVAR=NEWLINE
+ '[' '!' -z '|' ']'
echo "${!MYOWNVAR}" | tr '\&' '`'
++ echo '|'
++ tr '\&' '`'
+ MYTEMPVAR=|
echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYTEMPVAR^g" | tr '`' '\&'
++ echo '%boldIMDB:%bold %boldBabel%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold7.8 of 10%bold (21,517 people voted). It premiered in USA 5 November 2006, with %boldN/A screens%bold on the opening weekend.%newline%boldIMDB:%bold %boldBabel%bold plot summary: Tragedy strikes a married couple on vacation in the Moroccan desert, touching off an interlocking story involving four different families.'
++ sed 's^%newline^|^g'
++ tr '`' '\&'
+ MYOWNFORMAT1=%boldIMDB:%bold %boldBabel%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold7.8 of 10%bold (21,517 people voted). It premiered in USA 5 November 2006, with %boldN/A screens%bold on the opening weekend.|%boldIMDB:%bold %boldBabel%bold plot summary: Tragedy strikes a married couple on vacation in the Moroccan desert, touching off an interlocking story involving four different families.
echo "$OWNPAIR" | cut -d '|' -f 1
++ echo '%bold|BOLD'
++ cut -d '|' -f 1
+ MYOWNSTRING=%bold
echo "$OWNPAIR" | cut -d '|' -f 2
++ echo '%bold|BOLD'
++ cut -d '|' -f 2
+ MYOWNVAR=BOLD
+ '[' '!' -z $'\002' ']'
echo "${!MYOWNVAR}" | tr '\&' '`'
++ echo $'\002'
++ tr '\&' '`'
+ MYTEMPVAR=
echo "${MYOWNFORMAT1}" | sed "s^$MYOWNSTRING^$MYTEMPVAR^g" | tr '`' '\&'
++ echo '%boldIMDB:%bold %boldBabel%bold (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored %bold7.8 of 10%bold (21,517 people voted). It premiered in USA 5 November 2006, with %boldN/A screens%bold on the opening weekend.|%boldIMDB:%bold %boldBabel%bold plot summary: Tragedy strikes a married couple on vacation in the Moroccan desert, touching off an interlocking story involving four different families.'
++ sed 's^%bold^^g'
++ tr '`' '\&'
+ MYOWNFORMAT1=IMDB: Babel (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored 7.8 of 10 (21,517 people voted). It premiered in USA 5 November 2006, with N/A screens on the opening weekend.|IMDB: Babel plot summary: Tragedy strikes a married couple on vacation in the Moroccan desert, touching off an interlocking story involving four different families.
+ echo 'Sun Feb 25 06:18:44 2007 IMDB: "/site/XVID/Test" "IMDB: Babel (http://www.imdb.com/title/tt0449467 ), a Alejandro González Iñárritu movie which scored 7.8 of 10 (21,517 people voted). It premiered in USA 5 November 2006, with N/A screens on the opening weekend.|IMDB: Babel plot summary: Tragedy strikes a married couple on vacation in the Moroccan desert, touching off an interlocking story involving four different families." ""'
+ tr '[=$=]' ¤
+ sed 's|¤|USD|g'
+ '[' '!' -z .imdb ']'
+ echo -e '============================ PSXC IMDB INFO v2.7i ============================\n'
ls -1nl "$GLROOT$IMDBLKL" | tail -n 1 | { read junk junk owner group junk; echo $owner:$group; };
++ ls -1nl /glftpd/site/XVID/Test
++ tail -n 1
++ read junk junk owner group junk
++ echo 102:400
+ OWNER=102:400
+ echo 'Title........: Babel (2006) '
+ fold -s -w 77
+ head -n 1
+ echo -
+ echo 'IMDb Link....: http://www.imdb.com/title/tt0449467'
+ head -n 1
+ '[' '!' -z 'Directed by..: Alejandro González Iñárritu' ']'
+ echo 'Directed by..: Alejandro González Iñárritu'
+ fold -s -w 77
+ head -n 1
+ '[' '!' -z 'Genre........: Drama / Thriller' ']'
+ echo 'Genre........: Drama / Thriller'
+ fold -s -w 77
+ head -n 1
+ '[' '!' -z 'User Rating..: 7.8/10 (21,517 votes)' ']'
+ echo 'User Rating..: 7.8/10 (21,517 votes)'
+ fold -s -w 77
+ head -n 1
+ '[' '!' -z 'Tagline......: If You Want to be Understood...Listen' ']'
+ echo 'Tagline......: If You Want to be Understood...Listen'
+ fold -s -w 77
+ echo -
+ '[' '!' -z 'Country......: France / USA / Mexico' ']'
+ echo 'Country......: France / USA / Mexico'
+ fold -s -w 77
+ head -n 1
+ '[' '!' -z 'Language.....: Japanese Sign Language / French / English / Spanish / Japanese / Berber / Arabic' ']'
+ echo 'Language.....: Japanese Sign Language / French / English / Spanish / Japanese / Berber / Arabic'
+ fold -s -w 77
+ head -n 1
+ '[' '!' -z 'Certification: Sweden:11 / Norway:15 / New Zealand:R16 / Denmark:15 / Canada:14A /Manitoba/Ontario) / Canada:13+ / Australia:MA / Germany:16 / Portugal:M/12 / Hong Kong:IIB / Canada:18A / Netherlands:16 / Ireland:16 / Switzerland:14 / Brazil:16 / Iran:18+ / Switzerland:14 / Philippines:PG-13 / USA:R / Argentina:18 / Finland:K-15 / Malaysia:18PL / South Korea:18 / Singapore:M18 / France:Unrated / UK:15 / South Africa:16' ']'
+ echo 'Certification: Sweden:11 / Norway:15 / New Zealand:R16 / Denmark:15 / Canada:14A /Manitoba/Ontario) / Canada:13+ / Australia:MA / Germany:16 / Portugal:M/12 / Hong Kong:IIB / Canada:18A / Netherlands:16 / Ireland:16 / Switzerland:14 / Brazil:16 / Iran:18+ / Switzerland:14 / Philippines:PG-13 / USA:R / Argentina:18 / Finland:K-15 / Malaysia:18PL / South Korea:18 / Singapore:M18 / France:Unrated / UK:15 / South Africa:16'
+ fold -s -w 77
+ head -n 1
+ '[' '!' -z 'USA 5 November 2006' ']'
+ echo 'Premiere Date: USA 5 November 2006'
+ fold -s -w 77
+ head -n 1
+ '[' '!' -z 'Australia 14 December 2006 (limited)' ']'
+ echo 'Limited Date.: Australia 14 December 2006 (limited)'
+ fold -s -w 77
+ head -n 1
+ '[' '!' -z 'Runtime......: 142 min' ']'
+ echo 'Runtime......: 142 min'
+ fold -s -w 77
+ head -n 1
+ '[' '!' -z ' Brad Pitt .... Richard
Cate Blanchett .... Susan
Mohamed Akhzam .... Anwar
Peter Wight .... Tom
Harriet Walter .... Lilly' ']'
+ echo -
+ echo 'Credited Cast:'
+ echo ' Brad Pitt .... Richard
Cate Blanchett .... Susan
Mohamed Akhzam .... Anwar
Peter Wight .... Tom
Harriet Walter .... Lilly'
+ fold -s -w 77
+ '[' '!' -z '' ']'
+ '[' '!' -z 'Plot Outline.: Tragedy strikes a married couple on vacation in the Moroccan desert, touching off an interlocking story involving four different families. ' ']'
+ echo -
+ echo 'Plot Outline.: Tragedy strikes a married couple on vacation in the Moroccan desert, touching off an interlocking story involving four different families. '
+ fold -s -w 77
+ '[' '!' -z '' ']'
+ echo -e '\n============================ PSXC IMDB INFO v2.7i ============================'
+ '[' '!' -z .imdbinfoname ']'
echo $GENRECLEAN | tr '/ ' '\n' | sed -e /^$/d | wc -l
++ echo Drama / Thriller
++ tr '/ ' '\n'
++ sed -e '/^$/d'
++ wc -l
+ INFOGENRES=2
+ '[' '!' 2 -gt 2 ']'
+ let INFOGENREMAXED=INFOGENRES
+ '[' '!' 2 -lt 1 ']'
echo $GENRECLEAN | tr '/ ' '\n' | sed -e /^$/d | head -n $INFOGENREMAX | tr '\n' ' ' | sed "s/ /$INFOGENRESEP/g" | cut -d "$INFOGENRESEP" -f 1-$INFOGENREMAXED
++ echo Drama / Thriller
++ tr '/ ' '\n'
++ sed -e '/^$/d'
++ head -n 2
++ tr '\n' ' '
++ sed 's/ /-/g'
++ cut -d - -f 1-2
+ GENREFILE=Drama-Thriller
echo $RATINGVOTES | tr ',' '.'
++ echo 21,517
++ tr , .
+ VOTESFILE=21.517
+ '[' -z '' ']'
+ ISLIMITED=unknown
echo $BUSINESSSCREENS | tr ',' '.'
++ echo
++ tr , .
+ NUMSCREENS=
+ '[' -z '' ']'
+ NUMSCREENS=unknown
+ '[' -z '142 min' ']'
echo "$INFOFILENAME" | tr -c $INFOVALID $INFOCHARTO | sed "s%VOTES%*%g" | sed "s%SCORE%*%g" | sed "s%GENRE%*%g" | sed "s%RUNTIME%*%g" | sed "s%YEAR%*%g" | sed "s%ISLIMITED%*%g" | sed "s%SCREENS%*%g" | tr -d ' '
++ echo '[IMDB]=- Score SCORE - GENRE - (YEAR) -=[IMDB]'
++ tr -c '[:alnum:][:space:])(.\-=][\n' _
++ sed 's%VOTES%*%g'
++ sed 's%GENRE%*%g'
++ sed 's%RUNTIME%*%g'
++ sed 's%YEAR%*%g'
++ sed 's%ISLIMITED%*%g'
++ sed 's%SCREENS%*%g'
++ tr -d ' '
++ sed 's%SCORE%*%g'
+ INFOFILENAMEOLD=[IMDB]=-Score*-*-(*)-=[IMDB]
echo "$INFOFILENAMEOLD" | sed "s%*%.*%g"
++ echo '[IMDB]=-Score*-*-(*)-=[IMDB]'
++ sed 's%*%.*%g'
+ INFOFILENAMEOLDA=[IMDB]=-Score.*-.*-(.*)-=[IMDB]
echo "$INFOFILENAMEOLDA" | tr '\]\[' '.'
++ echo '[IMDB]=-Score.*-.*-(.*)-=[IMDB]'
++ tr '\]\[' .
+ INFOFILENAMEOLDB=.IMDB.=-Score.*-.*-(.*)-=.IMDB.
echo "$INFOFILENAME" | sed "s%VOTES%$VOTESFILE%g" | sed "s%SCORE%$RATINGSCORE%g" | sed "s%GENRE%$GENREFILE%g" | sed "s%RUNTIME%$RUNTIMECLEAN%g" | sed "s%YEAR%$TITLEYEAR%g" | sed "s%ISLIMITED%$ISLIMITED%g" | sed "s%SCREENS%$NUMSCREENS%g"
++ echo '[IMDB]=- Score SCORE - GENRE - (YEAR) -=[IMDB]'
++ sed s%VOTES%21.517%g
++ sed s%SCORE%7.8%g
++ sed s%GENRE%Drama-Thriller%g
++ sed 's%RUNTIME%142 min%g'
++ sed s%YEAR%2006%g
++ sed s%ISLIMITED%unknown%g
++ sed s%SCREENS%unknown%g
+ INFOFILENAMEPRINT=[IMDB]=- Score 7.8 - Drama-Thriller - (2006) -=[IMDB]
echo "$INFOFILENAMEPRINT" | tr -c $INFOVALID $INFOCHARTO
++ echo '[IMDB]=- Score 7.8 - Drama-Thriller - (2006) -=[IMDB]'
++ tr -c '[:alnum:][:space:])(.\-=][\n' _
+ INFOFILENAMEPRINT=[IMDB]=- Score 7.8 - Drama-Thriller - (2006) -=[IMDB]
ls -1 "$GLROOT$IMDBLKL" | grep -a -e "$INFOFILENAMEOLDB"
++ grep -a -e '.IMDB.=-Score.*-.*-(.*)-=.IMDB.'
++ ls -1 /glftpd/site/XVID/Test
+ '[' '!' -z '' ']'
+ '[' -e /glftpd/site/XVID/Test/.imdbinfoname ']'
+ mv /glftpd/site/XVID/Test/.imdbinfoname '/glftpd/site/XVID/Test/[IMDB]=- Score 7.8 - Drama-Thriller - (2006) -=[IMDB]'
+ '[' '!' -z /glftpd/bin/psxc-imdb-dotimdb.pl ']'
ls -1Ftr "$GLROOT$IMDBLKL" | grep -a -v "/" | grep -a -v "@" | grep -a -e "[.][nN][fF][oO]" | head -n 1
++ ls -1Ftr /glftpd/site/XVID/Test
++ grep -a -v /
++ grep -a -v @
++ grep -a -e '[.][nN][fF][oO]'
++ head -n 1
+ FILENAMED=fl-babel-proper-dvdrip-xvid.nfo
+ '[' '!' -z fl-babel-proper-dvdrip-xvid.nfo ']'
+ touch -acmr /glftpd/site/XVID/Test/fl-babel-proper-dvdrip-xvid.nfo /glftpd/site/XVID/Test
+ '[' '' = 4 ']'
+ /glftpd/bin/psxc-imdb-dotimdb.pl '"Sun Feb 25 06:18:44 2007" "/glftpd/site/XVID/Test/.imdb" "/site/XVID/Test" "Test" "http://www.imdb.com/title/tt0449467" "Babel (2006) " "Drama / Thriller" "7.8/10 (21,517 votes)" "France / USA / Mexico" "Japanese Sign Language / French / English / Spanish / Japanese / Berber / Arabic" "USA:R" "142 min" "Alejandro González Iñárritu" "" "USA 5 November 2006" "Australia 14 December 2006 (limited)" "21,517" "7.8" "Babel" "2006" "" "unknown" "Brad Pitt" "Richard" "If You Want to be Understood...Listen" "Tragedy strikes a married couple on vacation in the Moroccan desert, touching off an interlocking story involving four different families." "########--" "Brad Pitt, Cate Blanchett, Mohamed Akhzam, Peter Wight, Harriet Walter" "An Exhausting Film" ""'
ls -1Ftr "$GLROOT$IMDBLKL" | grep -a -v "/" | grep -a -v "@" | grep -a -e "[.][nN][fF][oO]" | head -n 1
++ ls -1Ftr /glftpd/site/XVID/Test
++ grep -a -v /
++ grep -a -v @
++ grep -a -e '[.][nN][fF][oO]'
++ head -n 1
+ FILENAMED=fl-babel-proper-dvdrip-xvid.nfo
+ '[' '!' -z fl-babel-proper-dvdrip-xvid.nfo ']'
+ touch -acmr /glftpd/site/XVID/Test/fl-babel-proper-dvdrip-xvid.nfo /glftpd/site/XVID/Test
+ cat /glftpd/ftp-data/logs/psxc-imdb.log
+ grep -a -F -v 'http://former.imdb.com/title/tt0449467|/site/XVID/Test'
+ cat /glftpd/ftp-data/logs/psxc-imdb.tmp
+ echo -n ''
cat $IMDBLOG
++ cat /glftpd/ftp-data/logs/psxc-imdb.log
+ '[' '!' -z '' ']'
+ echo -n ''
exit 0
+ exit 0