Questions tagged [case-sensitivity]
65 questions
190
votes
5 answers
How to uppercase the command line argument?
I searched SO and found that to uppercase a string following would work
str="Some string"
echo ${str^^}
But I tried to do a similar thing on a command-line argument, which gave me the following error
Tried
#!/bin/bash
## Output
echo…
mtk
- 26,802
- 35
- 91
- 130
90
votes
7 answers
How to match case insensitive patterns with ls?
I would like to list all files matching a certain pattern while ignoring the case.
For example, I run the following commands:
ls *abc*
I want to see all the files that have "abc" as a part of the file name, ignoring the case, like
-rw-r--r-- 1 mtk…
mtk
- 26,802
- 35
- 91
- 130
76
votes
6 answers
less searches are always case-insensitive
Trying to find out how to use case-insensitive searches in less I found this on serverfault.
That seems to perfectly answer my question. The problem is: It doesn't work like that here (OpenSUSE 13.1; less 458).
I had aliased less to less -WiNS but I…
Hauke Laging
- 88,146
- 18
- 125
- 174
33
votes
1 answer
Why can Shell builtins not be run with capital letters but other commands can?
Why is this?
When I do this
CD ~/Desktop
It doesn't take me to the Desktop. But this:
echo "foo
bar" | GREP bar
gives me:
bar
DisplayName
- 11,468
- 20
- 73
- 115
24
votes
5 answers
Is the username in Unix case sensitive?
Is ssh abc@servername different from ssh Abc@servername? Does the case of the username matter in Unix?
My user authenticates via LDAP.
saga saga
- 249
- 1
- 2
- 3
20
votes
8 answers
case-insensitive search of duplicate file-names
I there a way to find all files in a directory with duplicate filenames, regardless of the casing (upper-case and/or lower-case)?
lamcro
- 893
- 1
- 8
- 12
16
votes
6 answers
What does “Case sensitivity is a function of the Linux filesystem not the Linux operating system” mean?
I just read the following sentence:
Case Sensitivity is a function of the Linux filesystem NOT the Linux operating system.
What I deduced from this sentence is if I'm on a Linux machine but I am working with a device formatted using the Windows…
Som Shekhar Mukherjee
- 313
- 2
- 8
15
votes
2 answers
Case-preserving search and replace in vim?
In vim, I know I can search with or without case sensitivity. But if I want to search for a string in either upper or lower case, and replace it with a replacement of the same case, is that possible in a single :s///?
For example, I want to change…
Kevin
- 40,087
- 16
- 88
- 112
14
votes
4 answers
change entire directory tree to lower-case names
I'm working on a website conversion. The files as they were linked and served from the web server were case insensitive. But, I've made a dump of the site on my linux system and I'm writing scripts to migrate data. The problem is that I'm running…
user394
- 14,194
- 21
- 66
- 93
13
votes
1 answer
How do case-insensitive filesystems display both upper and lower case file names?
This question occurred to me the other day when I was working on a development project that relies on an opinionated framework with regard to file names. The framework (irrelevant here) wanted to see upper-case-first filenames. This got me…
111---
- 4,424
- 3
- 27
- 50
11
votes
3 answers
Can I force `man` to do lower case sensitive matching?
When I search man pages, the search is case sensitive, but only with regard to upper case letters. E.g., x will match x and X whereas X only matches x. This is the man-db version of man, used on fedora derived systems by default and available on…
goldilocks
- 86,451
- 30
- 200
- 258
10
votes
1 answer
grep: Ignoring GREP_OPTIONS to search case-sensitive
I have set GREP_OPTIONS="--ignore-case --color" in ~/.bashrc as I normally want grep to work case-insensitive. However, there are times when I need grep to actually search case-sensitive, but the man page doesn´t suggest a param for this.
How can I…
Larsen
- 254
- 1
- 3
- 12
10
votes
4 answers
Case-insensitive file system for production server?
The initial situation looks like this:
The corporate software is PHP-based.
It is delivered by Apache 2 on a Windows 2003 Server.
It is big.
It is a legacy of rather unprofessional developers who did not mind about case sensitivity or directory…
p13n
- 323
- 1
- 3
- 10
9
votes
1 answer
Broken pipe when grepping output, but only with -i flag
I'm trying to see if a certain python-library is installed by grepping the output of pip list. If I try this
pip list | grep -q $package, it works fine. If I try pip list | grep -qi $package, I get the following error output
pi@pibox:~ $ pip list |…
John Allard
- 1,318
- 1
- 14
- 23
8
votes
1 answer
Does the UNIX standard require case-sensitive filesystems?
One answer to this question mentions the UNIX 03 certification of OSX. Now AFAIK the standard file system of OSX is/was HFS, which "saves the case of a file that is created or renamed but is case-insensitive in operation" (i.e. it's case-preserving…
Martin Schröder
- 939
- 1
- 10
- 35