Understanding the IFS in Bash! Stringify Arrays easily - You Suck at Programming #030

Understanding the IFS in Bash! Stringify Arrays easily - You Suck at Programming #030

You Suck at Programming

5 месяцев назад

3,058 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@loca_youtube
@loca_youtube - 11.09.2024 20:22

i suck at programming because you always teach scripting

Ответить
@johnnywilliams2641
@johnnywilliams2641 - 11.09.2024 21:10

use ${a}. My goodness. Do I need to teach you how to bash? Jokes.

Ответить
@johnnywilliams2641
@johnnywilliams2641 - 11.09.2024 21:29

You do have a channel name that appeals to masochistic bashers(programmers?)

Ответить
@name1355_0ne
@name1355_0ne - 11.09.2024 22:21

Bash has lots of features, that are anti obvious and obscure. IFS is one of those. Thanks a lot for brilliant explanation in a concise manner, that was great.

Ответить
@MasterSergius
@MasterSergius - 11.09.2024 22:40

Why are you bully me? Just kidding, I really suck at programming, ty, sir. But tell me, please, what do you use to make videos, i.e. hardware (camera, mic) and software

Ответить
@RazoBeckett.
@RazoBeckett. - 12.09.2024 08:27

Cool

Ответить
@PerMejdal
@PerMejdal - 12.09.2024 14:55

echo "Bob;Alice;John" | while IFS=';' read a b c; do echo "$a + $b + $c"; done
Instead of
echo "Bob;Alice;John" | tr ";" " " | while read a b c; do echo "$a + $b + $c"; done

Ответить
@cinderwolf32
@cinderwolf32 - 12.09.2024 21:45

Bash is the only language that makes me wish I was working with Perl

Ответить
@JonBrookes
@JonBrookes - 14.09.2024 16:31

This is really useful stuff, thanks. Bash can be weird but its in Linux and subseqeuently UNIX everywhere so we like it or no, we need to know it

Ответить