Hi,
I have a text file something like this:
10.10.10.1,
ldap,
cn=users,dc=example,dc=com
.....
...
and many more lines
...
...
now i want to read each individual line from the file and assign it to a variable
example:
the script should read
10.10.10.1
and assign it to a variable say $x
like $x=10.10.10.1
and then read the next line
cn=users,dc=example,dc=com
and assign that to another variable like
$y=n=users,dc=example,dc=com
and so on.
Please any idea on how can i achieve this, esp reading each line from a file and storing it in a variable.
thanks.