#!/usr/bin/env python1#2# SPDX-License-Identifier: BSD-3-Clause3#4# Copyright 2023 Charlie Li <[email protected]>5#6# Redistribution and use in source and binary forms, with or without7# modification, are permitted provided that the following conditions8# are met:9#10# 1. Redistributions of source code must retain the above copyright11# notice, this list of conditions and the following disclaimer.12#13# 2. Redistributions in binary form must reproduce the above copyright14# notice, this list of conditions and the following disclaimer in the15# documentation and/or other materials provided with the distribution.16#17# 3. Neither the name of the copyright holder nor the names of its18# contributors may be used to endorse or promote products derived19# from this software without specific prior written permission.20#21# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS22# “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT23# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS24# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE25# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,26# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,27# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;28# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER29# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT30# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN31# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE32# POSSIBILITY OF SUCH DAMAGE.33#34# MAINTAINER= [email protected]3536import argparse37import csv3839argparser = argparse.ArgumentParser(description="Strip other columns from RECORD.")40argparser.add_argument('file', type=open, help="path to RECORD file")41args = argparser.parse_args()4243csvreader = csv.reader(args.file)44for row in csvreader:45print(row[0])464748