1#!/usr/bin/env bash
2#Prints packages that are not dependent on any other package3IFS=$'\n'read -rd '' -a pkgs < <( pacman -Q|cut -d' ' -f1 &&printf'\0')45for i in "${pkgs[@]}";do6pkg_count=$(pactree -r "$i"|wc -l)7["$pkg_count"=1]&&echo"$i">>pkglist
8done