pmprog
DNF (Did Not Finish)
- Joined
- Apr 25, 2011
- Messages
- 4,150
So I started witing a script to parse the upgrade log to display config file changes, but I'm getting some unexpected behaviour
#!/bin/bash
zcmd="zenity --list --checklist --column=\"\" --column=\"Config File\" --column=\"Temp Location\" "
while read line
do
if [[ $line = *Download* ]]
then
zcmd="$zcmd x $(echo $line | cut -f2 -d" ")"
fi
done </tmp/upgrade.log
echo "$zcmd"
$zcmd
When I run this, my dialogue is messed up, with Config File column header showing "Config (with the quotes). However if I copy and run the echo'd variable contents it works okay.
Example of my output
Any ideas? Cheers
#!/bin/bash
zcmd="zenity --list --checklist --column=\"\" --column=\"Config File\" --column=\"Temp Location\" "
while read line
do
if [[ $line = *Download* ]]
then
zcmd="$zcmd x $(echo $line | cut -f2 -d" ")"
fi
done </tmp/upgrade.log
echo "$zcmd"
$zcmd
When I run this, my dialogue is messed up, with Config File column header showing "Config (with the quotes). However if I copy and run the echo'd variable contents it works okay.
Example of my output
Code:
zenity --list --checklist --column="" --column="Config File" --column="Temp Location" x http://openpandora.org/feeds/unstable/all/Packages.gz. x http://openpandora.org/feeds/unstable/armv7a/Packages.gz. x http://openpandora.org/feeds/unstable/omap3-pandora/Packages.gz.