@kenanhancer/

BashStringSplit

bash

No description

fork
loading
Files
  • main.sh
  • pathFile.txt

This Plugin Crashed!

Error: Error: must not create an existing file {"type":"CREATE_FILE","wid":"0.2372105371988933","path":"main.sh","file":{"path":"main.sh","content":{"asEncoding":{"base64":"ZWNobyBIZWxsbyBXb3JsZAoKZWNobyAiYSBiIGMgZCBlIiB8IHRyICcgJyAnXG4nCgp0ciAiICIgJ1xuJyA8PDwgJ2EgYiBjIGQgZScKCmVjaG8gJ2EgYiBjIGQgZScgfCBzZWQgLWUgJ3MvIC9cbi9nJwoKdHIgJzsnICdcbicgPCBwYXRoRmlsZS50eHQKCnRyICc7JyAnXG4nIDw8PCAkKDxwYXRoRmlsZS50eHQpCgojcmVhZCBmcm9tIGZpbGUKZWNobyAkKDxwYXRoRmlsZS50eHQpCgpjYXQgcGF0aEZpbGUudHh0CgplY2hvCgpyZWFkIGZpcnN0IHNlY29uZCA8PDwgImhlbGxvIHdvcmxkIgoKZWNobyAkc2Vjb25kICRmaXJzdAoKZWNobyAibWVyaGFiYSBkdW55YSIgfCByZWFkIHRoaXJkIGZvcnRoCgplY2hvICRmb3J0aCAkdGhpcmQKCiNzdHJpbmcgc3BsaXQgYW5kIGNyZWF0ZSBhcnJheQpJRlM9JzonIHJlYWQgLWEgZmllbGQgPDw8ICIxOjI6Mzo0OjUiCgplY2hvICR7ZmllbGRbMF19ICR7ZmllbGRbMV19CgoKc3RyPSdhO2I7YztkO2U7ZjtnJwpmb3IgeCBpbiBgZWNobyAkc3RyIHwgdHIgIjsiICJcbiJgOyBkbyBlY2hvICR4OyBkb25l"},"asBuffer":null},"loaded":true}}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
echo Hello World

echo "a b c d e" | tr ' ' '\n'

tr " " '\n' <<< 'a b c d e'

echo 'a b c d e' | sed -e 's/ /\n/g'

tr ';' '\n' < pathFile.txt

tr ';' '\n' <<< $(<pathFile.txt)

#read from file
echo $(<pathFile.txt)

cat pathFile.txt

echo

read first second <<< "hello world"

echo $second $first

echo "merhaba dunya" | read third forth

echo $forth $third

#string split and create array
IFS=':' read -a field <<< "1:2:3:4:5"

echo ${field[0]} ${field[1]}


str='a;b;c;d;e;f;g'
for x in `echo $str | tr ";" "\n"`; do echo $x; done