# mkdir /BACKUP && cd /BACKUP
Create list file packages for next editing to our script
# ls -1 /var/db/pkg/ > list.sh
Edit list.sh
replace "\n" to " && pkg_create -v -b "
move last " && pkg_create -v -b " to begin file
remove first " && " from the begin
go to start line
insert "#!/usr/local/bin/bash"
create new line
Make file executable
chmod +x list.sh
Execute script
# ./list.sh
©by Kuzzya