Posts

Showing posts from August 17, 2018

How to get help text on sub-commands?

Image
Clash Royale CLAN TAG #URR8PPP up vote 0 down vote favorite I am looking for a way to bring help text on sub commands such as apt list . For example, if I write apt --help , I am getting: apt 1.2.26 (amd64) Usage: apt [options] command apt is a commandline package manager and provides commands for searching and managing as well as querying information about packages. It provides the same functionality as the specialized APT tools, like apt-get and apt-cache, but enables options more suitable for interactive use by default. Most used commands: list - list packages based on package names search - search in package descriptions And I would like to go deeper, and get help on apt list . If I try apt list --help , I am getting same exact help text of apt --help . I know list command supports apt list --upgradable parameter, but I could not see how to show it in the help text. Any solution on this? shell-script command-line man share | improve this question

comm command behaving strangely

Image
Clash Royale CLAN TAG #URR8PPP up vote 1 down vote favorite I have two files: one generated using find command in a folder to list files, sorting them numerically and writing to a file, and the other generated by a python script, which is not sorted, so I explicitly sort it numerically. The problem is that my sort output only has two columns and is as follows: 500016 500016 500174 500174 500277 500277 As you can see, even the common entries are shown separately in two columns and the third column is missing altogether, implying that there is nothing common between the two files, whereas these first three entries are indeed same. sort otherwise works as expected with some test files that I make. I know that comm needs the two files to be lexically sorted, and here is a list of options I tried and failed: comm <(sort file1.txt) <(sort file2.txt) from https://unix.stackexchange.com/a/377689/187419 failed. I also tried giving the -d option to sort explicitly, a