Help me with cut part 2..

Hi,

I have this file name : xxx.77876767575.abc.77887.iiii

If to get only the xxx i will need to do this command:
i=xxx.77876767575.abc.77887.iiii
name=`echo $i |cut -f1 -d "."`

How do i get 77876767575.abc.77887.iiii without xxx in front?

Please advice.

Thanks

Pretty much the same as you are already doing but as:
cut -d "." -f2-

John

It works!
Thank you so much John. Really appreciate your help :D:b:

Hi, try the "reverse", ie

i=xxx.77876767575.abc.77887.iiii
name=`echo $i |cut -f2- -d "."`

which means, take fields 2 and forward

/Lakris

Hi Lakris,

This works as well.. thank u thank u so much.. appreciate your reply :D:cool:

This will do the trick too :

$ i=xxx.77876767575.abc.77887.iiii
$ echo ${i#*.} 

Thank u very much ce9888, i could use that too in my script.. i've learnt something new today.. thanks again :wink:

> echo "xxx.77876767575.abc.77887.iiii" | awk 'BEGIN{FS=IFS=OFS="."} {print $2,$3,$4,$5}'
77876767575.abc.77887.iiii