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.
I didn't wanted to use the cut -c3 approach so I used the following approach using array and I getting my testcase 2 failed. Can anybody help me as my code is printing "-" while testcase2's o/p is showing " " space as an o/p
Cut #1
You are viewing a single comment's thread. Return to all comments →
I didn't wanted to use the cut -c3 approach so I used the following approach using array and I getting my testcase 2 failed. Can anybody help me as my code is printing "-" while testcase2's o/p is showing " " space as an o/p
!/bin/bash
arraystring=()
for ((i=1; i<=100; i++)); do
read -p "Enter INPUT")
if [ -z "$INPUT" ]; then break fi
done
for element in "${arraystring[@]}"; do
done