On Tue, Sep 30, 2008 at 01:48:46PM -0500, Martin McCormick wrote:
> Right now, I have a shell script that does the following:
>
> hostname=`echo $NEWDEV |awk 'BEGIN{FS="."}{print $1}'`
> domain=`echo $NEWDEV |awk 'BEGIN{FS="."}{print $2}'`
> top0=`echo $NEWDEV |awk 'BEGIN{FS="."}{print $3}'`
Mumia W.. wrote:
On 09/30/2008 01:48 PM, Martin McCormick wrote:
<--deleted problem description and awk solution-->
The bash shell can do this internally since it supports arrays:
NEWDEV=${NEWDEV//./ }
NEWDEV=($NEWDEV)
echo "hostname: ${NEWDEV[0]}"
echo "domain: ${NEWDEV[1]}"
echo "top0:
On 09/30/2008 01:48 PM, Martin McCormick wrote:
Right now, I have a shell script that does the following:
hostname=`echo $NEWDEV |awk 'BEGIN{FS="."}{print $1}'`
domain=`echo $NEWDEV |awk 'BEGIN{FS="."}{print $2}'`
top0=`echo $NEWDEV |awk 'BEGIN{FS="."}{print $3}'`
top1=`echo $NEWDEV |awk
Martin McCormick wrote:
Right now, I have a shell script that does the following:
hostname=`echo $NEWDEV |awk 'BEGIN{FS="."}{print $1}'`
domain=`echo $NEWDEV |awk 'BEGIN{FS="."}{print $2}'`
top0=`echo $NEWDEV |awk 'BEGIN{FS="."}{print $3}'`
top1=`echo $NEWDEV |awk 'BEGIN{FS="."}{print $4
On Tue, Sep 30, 2008 at 01:48:46PM -0500, Martin McCormick wrote:
> Right now, I have a shell script that does the following:
>
> hostname=`echo $NEWDEV |awk 'BEGIN{FS="."}{print $1}'`
> domain=`echo $NEWDEV |awk 'BEGIN{FS="."}{print $2}'`
> top0=`echo $NEWDEV |awk 'BEGIN{FS="."}{print $3}'`
Martin McCormick wrote:
Right now, I have a shell script that does the following:
hostname=`echo $NEWDEV |awk 'BEGIN{FS="."}{print $1}'`
domain=`echo $NEWDEV |awk 'BEGIN{FS="."}{print $2}'`
top0=`echo $NEWDEV |awk 'BEGIN{FS="."}{print $3}'`
top1=`echo $NEWDEV |awk 'BEGIN{FS="."}{print $4
Right now, I have a shell script that does the following:
hostname=`echo $NEWDEV |awk 'BEGIN{FS="."}{print $1}'`
domain=`echo $NEWDEV |awk 'BEGIN{FS="."}{print $2}'`
top0=`echo $NEWDEV |awk 'BEGIN{FS="."}{print $3}'`
top1=`echo $NEWDEV |awk 'BEGIN{FS="."}{print $4}'`
That looks in
7 matches
Mail list logo