[log in to unmask] wrote:
>
> My Salaam to all,
>
> The possible combinations of values for a particular variable TEMPVAR could
> be as follows:
>
> 1. TEMPVAR = "[log in to unmask]"
...snip...
>
> How do I break this up into 3 different variable TEMPVAR1, TEMPVAR2,
> TEMPVAR3 such that the results should be as follows:
>
> 1. TEMPVAR1 = "AI@J", TEMPVAR2 = "GROUP1", TEMPVAR3 = "ACCOUNT1"
...snip...
A POSIX shell solution:
nomad:/BIXBY/PUB/demo$ cat ./split
#!/bin/sh
TEMPVAR="[log in to unmask]"
OLDIFS="$IFS"
IFS=.
set -- $TEMPVAR
IFS="$OLDIFS"
echo "file=$1"
echo "group=$2"
echo "account=$3"
nomad:/BIXBY/PUB/demo$ ./split
file=AI@J
group=GROUP1
account=ACCOUNT1
- Mark B.