Horje
WARNING: apt does not have a stable CLI interface. Use with caution in scripts. Code Example
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
#First, consider the meaning of the warning you're trying to hide. 
#In theory, apt could change tomorrow to calling them "distributions" instead of "packages" (because it "does not have a stable CLI interface yet") and this would completely break your pipeline. A more likely change would be one which uses the word "packages" in multiple places, causing your pipeline to return extraneous information instead of only the package count you're looking for.


sudo apt update 2>/dev/null | grep packages | cut -d '.' -f 1




Shell

Related
warning: LF will be replaced by CRLF Code Example warning: LF will be replaced by CRLF Code Example
git remove all pdf files Code Example git remove all pdf files Code Example
wsl ubuntu git status and the file are not staged Code Example wsl ubuntu git status and the file are not staged Code Example
install php-fpm Code Example install php-fpm Code Example
install discord Code Example install discord Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11