Debian Codegraph @

scripts/lower-bound.py

raw
1 #!/usr/bin/env python3
2 #
3 # Copyright (C) 2025 Siemens
4 #
5 # SPDX-License-Identifier: MIT
6 #
7 # Takes a reverse-sorted, line separated list and
8 # returns the first element that is equal or smaller
9 # than the first argument.
10
11 import sys
12
13 for line in sys.stdin:
14 if line.rstrip() <= sys.argv[1]:
15 print(line.rstrip())
16 break