I can not give much explanation because my English is bad. The example of what I want to do is below;
try.sh
#!/bin/sh
echo -n "Enter the port:"
read ports
if [ ! -d "$ports" ]; then
mkdir -p /root/port$ports
echo "The folder was created for $ports"
wget -q www.example.com/example.tar.bz2
tar -xjf example.tar.bz2
su root -c "screen -A -m -d -S 'example$ports' ./example -RunningAsRootIsEvilAndIKnowThat"
echo "$ports started."
else
exit 0
fi
Putty;
root@ubuntu:~# sh try.sh
Enter the port: 4445, 4546
Created folder 'port4445'
Created folder 'port4546'
4445 started.
4546 started.
How can i make?
,as the delimiter? I would simply use space