bash string to array
Hi there guys,
If i have this: Code:
#!/bin/bash Code:
myscripts>vary p.s. Actually i am doing this: Code:
#!/bin/bash Imagine i want to assign each of the data columns in the result to a new variable instead of the last two... :( p.s.1. This data is fictitious, at least the echo part inside the "$()" |
Array sounds good to me, just throw another set of brackets outside $()
|
Cat skinning
Code:
# Here string |
Quote:
|
Quote:
|
i do not get any of that code :(
And in plain english, for dummies you did?
care of explaining that piece of code please :( Quote:
|
Just a few notes:
Code:
# Here string Code:
read _ _ _ foo bar _ <<< "$data" Code:
# Here document patolfo: http://mywiki.wooledge.org/BashGuide |
|
Quote:
Code:
c@CW8:~$ read _ rest |
about $_:
Quote:
|
Thanks tuxdev :) I forgot to check bash special parameters. :redface:
|
ok ok i will read more about bash redirection but...
I can not find what the triple <<<, stands for :(
read x x x foo bar x <<< $data i know read takes data from console, keyboard, but the <<<, i might think << is necessary only |
Quote:
Code:
#!/bin/bash Code:
[var1 var2] |
Code:
#!/bin/bash Code:
/myscripts>treintatreinta |
Quote:
|
All times are GMT -5. The time now is 04:09 AM. |