Linked Questions
44 questions linked to/from What does "LC_ALL=C" do?
2 votes
0 answers
3k views
"Sort" command using ascii order [duplicate]
I would like to use sort to sort by ASCII value, or at least by not disregarding punctuation, i.e: sort <<DATA a.01 a.04 a2 a.3 a.2 DATA Should produce a.01 a.04 a.2 a.3 a2 Especially these ...
1 vote
1 answer
117 views
What is "C sort order" in pm-action manpage? [duplicate]
From manpage pm-action(8): /etc/pm/sleep.d, /usr/lib/pm-utils/sleep.d Programs in these directories (called hooks) are combined and executed in C sort order before suspend and hibernate ...
124 votes
7 answers
223k views
Convert file contents to lower case
I have temp file with some lower-case and upper-case contents. Input Contents of my temp file: hi Jigar GANDHI jiga I want to convert all upper to lower. Command I tried the following command: ...
27 votes
3 answers
5k views
Why does sort say that ɛ = e?
ɛ ("Latin epsilon") is a letter used in certain African languages, usually to represent the vowel sound in English "bed". In Unicode it's encoded as U+025B, very distinct from everyday e. However, if ...
13 votes
3 answers
6k views
Why does [a-z] asterisk match numbers?
I have 3 directories at current path. $ls a_0db_data a_clean_0db_data a_clean_data $ls a_*_data a_0db_data: a_clean_0db_data: a_clean_data: $ls a_[a-z]*_data a_clean_0db_data: a_clean_data: I ...
16 votes
1 answer
22k views
Find a file where name starts with a capital letter
I'm trying to find all files for which there name starts with a capital letter. I have tried using the following command: find . -type f -regex '.*\/[A-Z][^/]*' It's finding paths with only lowercase ...
21 votes
4 answers
25k views
How to have console messages in English?
I am French and use my Debian system in French. However, I would like to have error messages in terminal in English. It allows me to post them on English speaking websites. How can I change my ...
11 votes
6 answers
35k views
Bash limiting precision of floating point variables
In Ubuntu 14.04.1 LTS 64-bit bash I am declearing floating point variables by multiplying floating point bash variables in bc with scale set to 3; however, I cannot get the number of digits after the ...
1 vote
7 answers
11k views
Matching n letter filename with ls
I am using the ls command in bash, trying to find all files or directory of length n. Let's say n=5 My command is: ls ????? But this would also include characters that are non letters such as period....
7 votes
5 answers
11k views
How to delete all directories in a directory older than 2 weeks except the latest one that match a file pattern?
I have the following path: /dir1/dir2/ In this path I have the following directories containing various (not relevant) application detrius: follower1234 1-Dec-2018 follower3456 2-Dec-2018 ...
16 votes
2 answers
37k views
Replace non-printable characters in perl and sed
I need to replace some non-printable characters with spaces in file. Specifically, all characters from 0x00 up to 0x1F, except 0x09 (TAB), 0x0A (new line), 0x0D (CR) Up until now, I just needed to ...
20 votes
2 answers
1k views
Bracket expression (without ranges) matching unexpected character in bash
I'm using bash on Linux. I am getting a success from the following if statement, but shouldn't this return a fail code? if [[ ■ = [⅕⅖⅗] ]] ; then echo yes ; fi The square does NOT equal any of the ...
9 votes
4 answers
63k views
Matching string with a fixed number of characters using grep
I am trying to find all 6 letter words using grep. I currently have this: grep "^.\{6\}$" myfile.txt However, I am finding that I am also getting results such as: étuis, étude. I suspect it has ...
8 votes
5 answers
3k views
List out strings which are substrings of other strings in the list
I have a list of names like so: dog_bone dog_collar dragon cool_dragon lion lion_trainer dog I need to extract out names that appear in other names like so: dragon lion dog I looked through the uniq ...
6 votes
2 answers
15k views
Print lines if given column starts with a capital letter
I have a file like this: ID A56 DS /A56 DS AGE 56 And I'd like to print the whole line only if the second column starts with a capital letter. Expected output: ID A56 DS AGE 56 What I've ...