Notes of unix snippets

Read from in a streaming way
1
while read line; do ${CMD}; done
Tokenize a csv
1
2
3
4
for i in $(cat $1); do
IFS=',' read -a array <<< "$i";
echo ${array[0]} ${array[1]} ${array[2]};
done
Redirection
Bidirectional
1
2
exec 4<>(command)
command <&4 >&4
Named Pipe
1
2
3
cd /tmp
mkfifo fifo
exec < fifo

Comment and share

  • page 1 of 1

Evangelos Pappas

{bio,
{softwareEngineer, [JavaScript, Node.JS, erlang, Java, Blockchain, Messaging, SMPP, SMTP]},
{fields, [Startups, ECommerce, Advertising, Marketing]},
{photographer, wannabe}}.

{pgp, [
{github_url, https://goo.gl/9rdxR8 },
{mit_host, https://goo.gl/6jEqa0 }]}.

{addresses, [
{bitcoin, 14ojSTH4rkHpzgCjNUSkYrgLrdrao6Bxns}]}.


[VibrantMedia, Evalonlabs].


London, UK