For the contents of a file to the table Shell script


You need to use the contents of your file? Is so simple with table but how ??
This is the solution with bash:

#!/bin/sh

i=1; while read aline ; do 
myarray[$i]=$aline; i=$(($i+1)) ;
done < your_file_name
for (( j=1 ; j <= ${#myarray[@]}; j++ )); do
echo ${myarray[$j]};
done
exit 0

Enjoy it
I wait for your comment and your suggestion.
Share on Google Plus

About Unknown

I am a cloud engineering student, I am interested in system and network admnistration. I am looking for an intership in order to get my engineer diploma, the internship I am looking for would preferably be of 6 up to 10 months long counting from december 2015.

    Blogger Comment
    Facebook Comment

0 commentaires:

Post a Comment