This script results in this error:

./list_not_repo.sh

./list_not_repo.sh: command substitution: regel 2: syntaxfout nabij onverwacht symbool '.*'

./list_not_repo.sh: command substitution: regel 2: `pacman -Q | sed -e “s|(.*[^ ]*) .*|1|g” '

./list_not_repo.sh: command substitution: regel 3: syntaxfout nabij onverwacht symbool '('

./list_not_repo.sh: command substitution: regel 3: `pacman -Sl | sed -e “s|[^ ]* (.*[^ ]*) .*|1|g”'

This is the executed script (as in the knowledge base)

#! /bin/bash

installed=`pacman -Q | sed -e “s|(.*[^ ]*) .*|1|g” `

repos=`pacman -Sl | sed -e “s|[^ ]* (.*[^ ]*) .*|1|g”`

for pkg in $installed

do

found=`echo $repos | grep $pkg`

if [ “$found” == “” ]; then

echo $pkg

fi

done

# end