> This addition helped my scripts become a little more streamlined, but > of course puts in an additional entry into the source file I need to > track. As file name extensions don't always work across all sorts of > systems, many still hamstrung by 8.3, what is the preferred or > recommend mechanism for checking file types the Plan 9 way since we no > longer have the System V magic?
i'm pretty confused by what you're saying here. why doesn't file(1) work? are you saying there's something wrong with editing the source as opposed to to editing a configuration file? either way your system is equally non-standard. in either event, submitting a patch and having it accepted is the only way around this. > In a sense, a modified xd(1) that has an option for a restricted range > of byte sequences would work. That would at least provide a fast seek > into a file that can be pipelined into any other command sequence--no > need to dump the whole file when you just need to the first four > bytes, but then it just gets to the point of having a magic file. why would xd need modification? how about dd -if $infile -bs $nbytes -count 1 | xd there are no restrictions placed by dd on $nbytes. it could be 4 or 99132 or whatever. dd's -iseek option similarly can specify any offset. - erik