bash - Include a file to an executable script, grab line 1 and line 2, assign them to data_holders -


assume there file named a.txt
contains:

aaa bbb 

i need create executable script that
grab these 2 lines a.txt

and print them in terminal.

in other words when run..

./script 

it needs print

aaa:bbb 

update

i need assign first line file a.txt
letter "a"

i need assign second line file a.txt
letter "b"

so can access "a" , "b" within bash script
separately.

you can use awk this:

awk '{printf $1":"}' a.txt 

Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -