On Mon, Nov 1, 2010 at 3:57 AM, Zico <[email protected]> wrote: > rename my file; is there any command of "mv" which can rename my file which > starts with "bv_001.3gp"? Here, I just need to change the "number", but > every other words "bv" and ".3gp" will be same? Are there any "mv" command > to do so??
Does this help you? $ touch bv_001.3gp $ basename bv_001.3gp .3gp | cut -d "_" -f 2 001 $ FOO=`basename bv_001.3gp .3gp | cut -d "_" -f 2` $ echo $FOO 001 $ echo `expr $FOO + 1` 2 > -- > Best, > Zico > _______________________________________________ > ILUGC Mailing List: > http://www.ae.iitm.ac.in/mailman/listinfo/ilugc > -- With Regards, Mehul Ved _______________________________________________ ILUGC Mailing List: http://www.ae.iitm.ac.in/mailman/listinfo/ilugc
