I am a beginner at shell scripting, actually i am working on my first script right now.
Anyway i have searched the world how to grep two letters from each word (it will always just be two words).
For example:
Example Blablabla
I want my script to cut out Ex (from the first word) and Bl (from the second word).
Which combined ExBl
However it will always be diffrent kind of words so i cannot use sed /Ex/ or something.
I also want Ex and Bl to be variables so i can use them later on.
could this be the answer:
cut -c1-2 filename | cut f2" "-c1-2 filename
Very insecure of the second cut, f2 one.
However if this is the solution i still need them to become variables somehow or maybe by: a=cut -c1-2 filename
Also just came up with another solotion could maybe come to hand as other users can read this thread as for help.
Its not compiled but it is a solotion which also works.
a=cut -c1-2 filename | sed "delete whole first line" | b=cut -c1-2 filename