File: lower-bound.py

package info (click to toggle)
debsbom 0.6.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,248 kB
  • sloc: python: 5,965; makefile: 31
file content (16 lines) | stat: -rwxr-xr-x 335 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/usr/bin/env python3
#
# Copyright (C) 2025 Siemens
#
# SPDX-License-Identifier: MIT
#
# Takes a reverse-sorted, line separated list and
# returns the first element that is equal or smaller
# than the first argument.

import sys

for line in sys.stdin:
    if line.rstrip() <= sys.argv[1]:
        print(line.rstrip())
        break