I have a folder full of binary files. The first 18 bytes of each file needs to be deleted. Maybe someone can help? Thanks in advance


#!/bin/bash
#Reads all files ending in specified extension in folder, deletes first X bytes and then saves the modified file as prefix.oldname
X=18 #Number of bytes to delete from file
EXT=jpg #File extension of files being modified
PREFIX=new #The prefix prepended to the filename to after moifying the file
for file in $(echo *.$EXT); do dd ibs=$X skip=1 if=${file} of=$PREFIX.${file}; done
Original address: https://www.donationcoder.com/forum/index.php?topic=16450.0