How to use read the char * from file?

i have a file 1.txt. the file contains:

  • server1.com : ewf,wefwef,wef,wef
    -------------------------------------
  • server2.com : ewf,wefwef,wef,wef
    -------------------------------------
  • server3.com : ewf,wefwef,wef,wef
    -------------------------------------

how can i read * ? from the start of the line?

the is the code
Code:
#!/bin/bash

while read line
do
[[ "$line" =~ ^server1.com ]] && url=${line##: }

done < 1.txt

for U in ${url//,/ }
do
printf "http://$U.com\n"
done

it doesnt work...........

Double posting not allowed.

---------- Post updated at 08:55 AM ---------- Previous update was at 04:48 AM ----------

someone please??

I have answered your other thread

1 Like

Bumping up posts or double posting is not permitted in these forums.

Please read the rules, which you agreed to when you registered, if you have not already done so.

You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future

Thank You.

The UNIX and Linux Forums.

1 Like