in scripts/elf_ubuntu_dependency_analyzer.py [0:0]
def is_elf_binary(file_path):
"""
Check if a file is an ELF binary.
Args:
file_path (str): Path to the file.
Returns:
bool: True if the file is an ELF binary, False otherwise.
"""
file_output = run_command(['file', file_path])
return 'ELF' in file_output and ('executable' in file_output or 'shared object' in file_output)