starrysky1
Programmer
Hello and thanks for reading my post, I really appreciate it.
Need a way to read from the arrayfile and search the datafile (with arrayfile elements) in a way that prints out how the arrayfile elements are found. An awk one liner is preferred.
arrayfile:
datafile:
desiredoutputfile:
So its basically remove the last character from the arrayfile elements, search the datafile until you find the match, and if the next character after match is the same as was removed then write a 1 and if not then write a 0, It also needs to search in the most squeezed way possible (from beginning of each character in datafile, not by blocks like normal search in text editor, as portrayed in my previous post
Thank you.
Need a way to read from the arrayfile and search the datafile (with arrayfile elements) in a way that prints out how the arrayfile elements are found. An awk one liner is preferred.
arrayfile:
Bash:
haha
hahh
Bash:
aaahahahaaaahahahhaaahahahaaahahaaaa
Bash:
haha 1110111
hahh 0001000
Thank you.