[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to set $?
From: |
David |
Subject: |
Re: How to set $? |
Date: |
Sun, 26 Dec 2021 09:40:34 +1100 |
Sorry everyone, I made a typing mistake.
On Sun, 26 Dec 2021 at 09:37, David <bouncingcats@gmail.com> wrote:
> apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y
> saved_result=$?
> apt-get autoremove --purge -y && apt-get autoclean -y
> exit $?
Should be:
apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y
saved_result=$?
apt-get autoremove --purge -y && apt-get autoclean -y
exit "$saved_result"