I am making a search and install PPA script for Ubuntu. This script with zenity works 80%, the problem is when this script searches; displays only the first line. I need all lines
#!/bin/sh
# simple search and install PPA
# by David Vásquez
if [ $# -gt 0 ] ; then
echo "$*"
else
echo "No input"
exit
fi
code=$*
cat /dev/null > /tmp/ppa
cat /dev/null > /tmp/ppa-url-tmp
mojito=$(curl https://launchpad.net/ubuntu/+ppas?name_filter=$code | grep -e '+archive/' | grep "$code" | awk -F'' '{print $1}' | uniq | tr -d '~')
echo $mojito | tr ' ' '\n' | tee -a /tmp/ppa-url-tmp
file="/tmp/ppa-url-tmp"
while IFS= read -r line; do
# display $line or do somthing with $line
title=$(curl https://launchpad.net/~$line | grep -e '' | awk -F '' '{print $2}' | awk -F '' '{print $1}' | sed 's/^/"/' | sed 's/$/"/')
description=$(curl https://launchpad.net/~$line | grep -e 'content=' | awk -F 'content="' '{print $2}' | awk -F '.' '{print $1}' | tr -d '/>' | tr -d '"' | sed -e :a -e N -e 's/\n/ /' -e ta | sed 's/^/"/' | sed 's/$/"/')
support=$(curl https://launchpad.net/~$line | grep -e '
Asked by davidva
(160 rep)
May 31, 2014, 09:03 AM
Last activity: Apr 28, 2023, 11:09 PM
Last activity: Apr 28, 2023, 11:09 PM