mirror of
https://github.com/onceupon/Bash-Oneliner.git
synced 2024-11-26 06:17:01 +00:00
Data wrangling
- Delete all non-printing characters
This commit is contained in:
parent
0df09b76c3
commit
6c083c518e
@ -2417,6 +2417,11 @@ username=`echo -n "bashoneliner"`
|
|||||||
tee <fileA fileB fileC fileD >/dev/null
|
tee <fileA fileB fileC fileD >/dev/null
|
||||||
```
|
```
|
||||||
|
|
||||||
|
##### Delete all non-printing characters
|
||||||
|
```bash
|
||||||
|
tr -dc '[:print:]' < filename
|
||||||
|
```
|
||||||
|
|
||||||
##### Remove newline / nextline
|
##### Remove newline / nextline
|
||||||
```bash
|
```bash
|
||||||
tr --delete '\n' <input.txt >output.txt
|
tr --delete '\n' <input.txt >output.txt
|
||||||
@ -2429,6 +2434,7 @@ tr '\n' ' ' <filename
|
|||||||
##### To uppercase/lowercase
|
##### To uppercase/lowercase
|
||||||
```bash
|
```bash
|
||||||
tr /a-z/ /A-Z/
|
tr /a-z/ /A-Z/
|
||||||
|
|
||||||
```
|
```
|
||||||
##### Translate a range of characters (e.g. substitute a-z into a)
|
##### Translate a range of characters (e.g. substitute a-z into a)
|
||||||
```bash
|
```bash
|
||||||
|
Loading…
Reference in New Issue
Block a user