In case anybody thinks the obsolete 'head -<number>' and
'tail -<number>' is just a warning, please take note of the following
command output (especially the file sizes):

==================================================
[EMAIL PROTECTED] root]# cat temp1.txt
a
b
c
d
[EMAIL PROTECTED] root]# head -2 temp1.txt > temp2.txt
head: `-2' option is obsolete; use `-n 2'
Try `head --help' for more information.
[EMAIL PROTECTED] root]# tail -2 temp1.txt > temp3.txt
tail: `-2' option is obsolete; use `-n 2'
Try `tail --help' for more information.
[EMAIL PROTECTED] root]# ls -ld temp2.txt temp3.txt
-rw-r--r--    1 root     root            0 Aug  4 04:56 temp2.txt
-rw-r--r--    1 root     root            0 Aug  4 04:56 temp3.txt
==================================================

Abel

PS Sorry for the ignorance, in case anybody has posted anything about
this in cooker before.



On 2003-07-31(Thu) 19:58:10 -0700, Quel Qun wrote:
> Hi,
> 
> Noticed this message during the boot process. 'head -1' should be
> replaced by 'head -n 1'.
> 
> for i in `rpm -ql initscripts` ; do
>   z=`grep -m 1 "head -[[:digit:]]" $i` ;
>   if [[ -n $z ]] ; then
>     echo $i: $z;
>   fi ;
> done
> 
> /etc/rc.d/rc.modules
> /etc/sysconfig/network-scripts/ifdown-ppp
> /etc/sysconfig/network-scripts/ifup
> /sbin/ifup
> /usr/share/alsa/alsa-utils
> 
> It looks like a bunch of other scripts use 'head -1', it would be safer
> to change them as early as possible.
> 
> Rgds,
> -- 
> kk1



-- 
Abel Cheung
Linux counter #256983   | http://counter.li.org
GPG Key: (0xC67186FF)   | http://deaddog.org/gpg.asc
Key fingerprint: 671C C7AE EFB5 110C D6D1  41EE 4152 E1F1 C671 86FF

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to