1. I put the command "sudo apt update && apt list --upgradable", like this…
- User
- I put the command "sudo apt update && apt list --upgradable", like this upgrdCmd="sudo apt update && apt list --upgradable"
- I put the output of that command in another variable, like this: upgrdCmdOut=upgrdCmd)
- I made another variable called upgrdCmdLst to get the number of packages that have updates available, like this: upgrdCmdLst=upgrdCmdOut" | wc -l)
when i run echo $upgrdCmdLst it gives the output 1, even tho no updates are available. when i run "sudo apt update && apt list --upgradable | wc-l" without doing all that the output is 0, but not when i do it like that. why is that? and how can i fix it?
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.