[PATCH] Make split_combined_hex work with newer coreutils
Joshua Kwan
joshk
Thu Mar 25 19:24:04 PST 2004
On Thu, Mar 25, 2004 at 07:17:35PM -0800, Joshua Kwan wrote:
> Here's a patch that allows split_combined_hex to work with newer
> coreutils releases where the syntax has gotten stricter for some of the
> stuff used in this script.
Ooh, crikey, here's the diff.
--
Joshua Kwan
-------------- next part --------------
Index: utils/split_combined_hex
===================================================================
RCS file: /cvs/hostap/utils/split_combined_hex,v
retrieving revision 1.1
diff -u -r1.1 split_combined_hex
--- utils/split_combined_hex 16 Oct 2002 07:32:04 -0000 1.1
+++ utils/split_combined_hex 26 Mar 2004 03:15:33 -0000
@@ -20,9 +20,9 @@
while [ -s $IN ]; do
num=$(($num+1))
echo "Image $num"
- eline=`grep -n ^S6 $IN | head -1 | cut -f1 -d:`
+ eline=`grep -an ^S6 $IN | head -n 1 | cut -f1 -d:`
if [ -n "$eline" ]; then
- head -$eline $IN | grep -vE '^S6|^S4' > $PART
+ head -n $eline $IN | grep -vE '^S6|^S4' > $PART
tail +$(($eline+1)) $IN > $IN.tmp && mv $IN.tmp $IN
else
grep -vE '^S6|^S4' $IN > $PART
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 881 bytes
Desc: Digital signature
Url : http://lists.shmoo.com/pipermail/hostap/attachments/20040325/dffb3747/attachment.pgp
More information about the Hostap
mailing list