How to print a single character in a variable in omakefile

57 Views Asked by At

In my omakefile, I have a variable name 'CHECK' with variable value 'hello'. My question is how can I read/print only 'h'?

Example:

Input:

CHECK = hello

Output:

h

I know how to print entire variable $(CHECK).

What I tried:

Input:

CHECK = hello
FIRST=$(shell echo $(CHECK) | head -c 1)

Output of FIRST VARIABLE:

(Empty)
0

There are 0 best solutions below