Welcome to DU! The truly grassroots left-of-center political community where regular people, not algorithms, drive the discussions and set the standards. Join the community: Create a free account Support DU (and get rid of ads!): Become a Star Member Latest Breaking News Editorials & Other Articles General Discussion The DU Lounge All Forums Issue Forums Culture Forums Alliance Forums Region Forums Support Forums Help & Search

w0nderer

(1,937 posts)
2. well one problem (not at a nix system right now and i always want to doublecheck)
Sun Oct 18, 2015, 12:58 AM
Oct 2015

could be that you are using > instead of >> to redirect output

> #for each iteration it'll overwrite the outputfile

>> #appends data to output file

rough and fast 'hackup' could look like

(checked on busybox) and dumps errors to stdout

for i in $(ls);do echo $i >>output.out && hexdump $i |head -4 >> output.out ;done

output.out will be
filename
hexoutput 4 lines
filename
hexoutput 4 lines

and so on

hope this helps (like i said, only tested on w32 system with busybox ash/sh) (all i had access to fast and dirty)

Recommendations

0 members have recommended this reply (displayed in chronological order):

Latest Discussions»Culture Forums»Open Source and Free Software»Need some really Unix-y h...»Reply #2