We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
then I realized that this code never reads the last line, whereas it does with bash on my system. Indeed I also tried with the NON-solution to see if the code replicates the input, but it always removes the last line.
whilereadx;doecho$xdone
Can anyone help me understand why?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Cut #1
You are viewing a single comment's thread. Return to all comments →
I was trying with the parameter expansion
then I realized that this code never reads the last line, whereas it does with bash on my system. Indeed I also tried with the NON-solution to see if the code replicates the input, but it always removes the last line.
Can anyone help me understand why?