Skip to main content
added 74 characters in body
Source Link
ctrl-alt-delor
  • 28.8k
  • 11
  • 66
  • 113

This removes the first 5, so is wrong, if you can findout how to do an inverted head (remove head), then you will have the answer. A combination of wc and tail may do it.

atq | sort -g | head -5 | cut -f1 | xargs atrm 

Correct answer

atq | sort -g | tail -n +6 | cut -f1 | xargs atrm 

This removes the first 5, so is wrong, if you can findout how to do an inverted head (remove head), then you will have the answer. A combination of wc and tail may do it.

atq | sort -g | head -5 | cut -f1 | xargs atrm 

This removes the first 5, so is wrong, if you can findout how to do an inverted head (remove head), then you will have the answer. A combination of wc and tail may do it.

atq | sort -g | head -5 | cut -f1 | xargs atrm 

Correct answer

atq | sort -g | tail -n +6 | cut -f1 | xargs atrm 
Source Link
ctrl-alt-delor
  • 28.8k
  • 11
  • 66
  • 113

This removes the first 5, so is wrong, if you can findout how to do an inverted head (remove head), then you will have the answer. A combination of wc and tail may do it.

atq | sort -g | head -5 | cut -f1 | xargs atrm