Redirected to the -questions. Paul <[email protected]> wrote: > What about matching the ' marks in this section? I get a command error. > > > > # XXX: put extraction in its own function > > > MAGIC_NUMBER=`od -An -t u4 -N 4 -j $MAGIC_OFFSET "$file" | tr -d ' '`
That command works fine for me: $ MAGIC_OFFSET=42 $ file=/etc/motd $ MAGIC_NUMBER=`od -An -t u4 -N 4 -j $MAGIC_OFFSET "$file" | tr -d ' '` $ echo $MAGIC_NUMBER 540684323 What's the exact error message that you get, and what are the values of the variables involved? By the way, when debugging shell scripts it is very helpful to run the shell with -vx. Then it prints the script as it is being parsed, and additionally each command is printed after expansion. Best regards Oliver -- Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M. Handelsregister: Registergericht Muenchen, HRA 74606, Geschäftsfuehrung: secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mün- chen, HRB 125758, Geschäftsführer: Maik Bachmann, Olaf Erb, Ralf Gebhart FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd "I invented Ctrl-Alt-Delete, but Bill Gates made it famous." -- David Bradley, original IBM PC design team _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "[email protected]"
