![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| if test case in korn shell | fluke_perf | UNIX for Dummies Questions & Answers | 3 | 03-28-2008 09:19 AM |
| Ignore case sensitive in Case Switch | annelisa | Shell Programming and Scripting | 1 | 07-13-2006 01:36 AM |
| Removing duplicate lines ignore case | hellsd | UNIX for Dummies Questions & Answers | 17 | 12-02-2004 07:47 AM |
| Shell script automation using case statement | ianf | Shell Programming and Scripting | 6 | 09-12-2002 06:17 AM |
| lower case to upper case string conversion in shell script | dchalavadi | UNIX for Dummies Questions & Answers | 3 | 05-28-2002 09:07 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi
New to this Unix dot com. I would like to know how i can ignore the case in filename which is getting as user directoty to shell script. For Ex: Source (/aa/bb/patch/) Directory may contains more than 1 files as like 1. aa.csv or Aa.csv or AA.csv or aa.CSV 2. bb.csv 3. cc.CSV I need to copy aa.csv to destination directory(/app/gh/dest/). Thanks in advance for your help... Regards AAH |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
In ksh you can ignore case several ways. Here is one:
Code:
$ ls Data daTa datA data
Data daTa datA data
$ cat look
#! /usr/bin/ksh
target="data"
typeset -l lname
for name in * ; do
lname=$name
[[ $lname = $target ]] && echo $name
done
exit 0
$ ./look
Data
daTa
datA
data
$
|
|
#3
|
|||
|
|||
|
File Server PC Shares
Hi Everybody,
Can anyone help my users shared folder increase their space -- some of them has a cretical disk space 98% used space... Please help us on how to increase their space nor any other way to prevent losing space from each folder.. Thanks you very. |
|
#4
|
|||
|
|||
|
Ignore CASE/case in script...
The means I use to ignore case, as an example is the following snippet:
read -p "Enter Y/N to continue: " YN y|Y|YES|Yes|n|N|NO|No=`echo $YN | tr [:lower:][:upper:]` This allows anybody using your script to supply a response of any kind or variation and it will be converted to an upper CASE respones i.e. Y or N! Good luck! |
|||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|