FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Xubuntu User

 
 
LinkBack Thread Tools
 
Old 08-23-2012, 06:20 PM
MR ZenWiz
 
Default Precise problem with file name case (in)sensitivity

I have a shell script I use to convert TIFFs into PDFs using tiffcp
and tiff2pdf. Today I had occasion to use it with some interesting
results.

Here is the shell script:

#!/bin/bash

if [[ -z "$1" || "$1" == "-h" ]]; then
echo "Usage: `basename $0` [-c <combined-tif>] {<file-name>|<file-base>}..."
echo " where <file-name> includes the '.tif' and <file-base> does not."
exit 0
fi

if [[ "$1" == "-x" ]]; then
shift
set -x
fi

if [[ "$1" == "-c" ]]; then
tgt=$2
shift 2
k=`basename $tgt .tif`
if [[ $tgt == $k ]]; then # add the "tif" suffix
tgt="$k.tif"
fi
echo "tiffcp $* $tgt"
tiffcp $* $tgt # combine all the tifs into one
set $tgt # and change the parameters to just this one
fi

for i in $*; do
j=`basename $i .tif`
if [ $j = $i ]; then
i="$i.tif"
fi
j="$j.pdf"
echo "tiff2pdf $i > $j"
tiff2pdf -z $i > $j
done

---

I had four TIFFs I wanted to combine into a single one and from there
into a single pdf, to I ran it thus:

tif2pdf -c NajC0823 najC0823?.tif

What it should have done is this: combine the najC0823?.tif files into
a single TIFF called NajC0823.tif, then convert that into
NajC0823.pdf.

However, what it did was convert NajC0823.tif into najC0823.pdf. When
I try to rename the actual result file (with the first letter lower
cased) to the intended result name (with the first letter upper
cased), mv says the two names are the same file.

Since when do the commands, including bash and mv, if not others, not
allow/recognize.enforce case sensitivity in file names? Or is it
something else?

MR

--
xubuntu-users mailing list
xubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/xubuntu-users
 

Thread Tools




All times are GMT. The time now is 05:22 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org