i’ve file contain following pattern
aaaa0000 aaaa0000@gmail.com bbbb0001 bbbb0001@gmail.com …
i need read value file , put variable e.g.
- aaaa0000 should
user
- aaaa0001@gmail.com should email
when try following
while ifs= read -r file; [[ $email == *@* ]] && [[ $user==“%s%18d\n”]]
i don’t right values . how should change read spreated user , email value varibles?
pass names of variables want parse content arguments read
:
while read -r user email; echo "user <${user}> has email <${email}>" done
for extensive discussion, see bashfaq #1.
Comments
Post a Comment