Telegram- 👇 😉
-
. WIKIMERIONET
Merion Mertics , ,

CRM

3

, . , Linux , .

      Linux

Linux . , . .


tr

tr (translate) . , , tr, :

$ echo Hello There | tr [:lower:] [:upper:]
HELLO THERE

, , , , :

#!/bin/bash
echo -n "Enter department name: "
read dept
echo $dept | tr [:lower:] [:upper:] >> depts.

[: upper:] [: lower:] :

echo $dept | tr [:upper:] [:lower:] >> depts.

, A-Z a-z:

echo $dept | tr a-z A-Z >> depts.

awk

awk , tr. toupper tolower. , , :

echo $dept | awk '{print toupper($0)}' >> depts.

:

echo $dept | awk '{print tolower($0)}' >> depts.

sed

sed (stream editor) . , , .

echo $dept | sed 's/[a-z]/\U&/g' >> depts.

U L.

echo $dept | sed 's/[A-Z]/\L&/g' >> depts.

Awk sed . :

$ awk '{print tolower($0)}' depts
finance
billing
bookkeeping

, , :

$ awk '{print tolower($0)}' depts > depts-
$ mv depts- depts

, sed, awk, sed , , , :

$ sed 's/[A-Z]/\L&/g' depts.

.

, :

$ echo design \& engineering| sed -e "s/\b\(.\)/\u\1/g"
Design & Engineering

, .