15 lines · bash
1#!/bin/bash2# SPDX-License-Identifier: GPL-2.03 4# Simple helper script to transform ptp debugfs timestamp event queue filtering5# masks from decimal values to hexadecimal values6 7# Only takes the debugfs mask file path as an argument8DEBUGFS_MASKFILE="${1}"9 10#shellcheck disable=SC2013,SC208611for int in $(cat "$DEBUGFS_MASKFILE") ; do12 printf '0x%08X ' "$int"13done14echo15