#!/bin/bash
if [ "$#" -ne 1 ]; then
echo "Usage: $0 <filename>"
exit 1
fi
output_file="samnsung_power_fixed.key"
> "$output_file"
content=$(cat $1)
for value in $content; do
if [[ $value == +* ]]; then
echo "pulse ${value#+}" >> "$output_file"
elif [[ $value == -* ]]; then
echo "space ${value#-}" >> "$output_file"
fi
done