Artificial intelligent assistant

awk + print line only if the first field start with string as Linux1 how to print the line in case the first field start with Linux1 for example: echo Linux1_ver2 12542 kernel-update | awk '{if ($1 ~ Linux1 ) print $0;}' the target is to print the line , while the first field start with Linux1 example of lines: Linux1-new 36352 Version:true Linux1-1625543 9847 Linux1:16254 8467563 remark - space or TAB could be before the first filed

One way:


echo "Linux1_ver2 12542 kernel-update" | awk '$1 ~ /^ *Linux1/'

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 4ba9963eddf38dbbadf817de59911d02