Insert 6 digits into a chart

Nee help in :
1.  add my 6 figure into my chart
2.  delete  name in a chart
66666  Gustavson        Ian     25      M       250000
88888 Anderson  Jane    Jane    38      F
need to delete the 1st Jane and insert 450000 under 250000.  Please help me the chart should look like this
66666  Gustavson        Ian     25      M       250000
88888  Anderson        Jane    38      F        450000

Please help!!!!!!!!!!
leftridge1Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ozoCommented:
perl -i -pe 's/Jane\s+(Jane.*)/$1\t450000/' chart

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
leftridge1Author Commented:
when i put in the command it came out like this
66666  Gustavson        Ian     25      M       250000
88888 Anderson  Jane  38       F       450000
Is there any way I can add space to line the chart up.  
XoFCommented:
awk '{ if ($3~/Jane/) {print $1"\t"$2"\t"$4"\t"$5"\t"$6"\t450000" }else {print $0}}' <file>

if input isn't tab-separated, try this one:
awk '{ if ($3~/Jane/) {print $1"\t"$2"\t"$4"\t"$5"\t"$6"\t450000" }else {print $1"\t"$2"\t"$3"\t"$4"\t"$5"\t"$6}}' <file>

bye,

-XoF-
OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.

ahoffmannCommented:
another variant:
awk '($4=="Jane"){$4=$5;$5=$6;$6="450000";}{printf("%-6s%-16s%-8s%-8s%-8s%s\n",$1,$2,$3,$4,$5,$6);}' chart
XoFCommented:
btw:
Perhaps one of you has an idea (according to the given awk-suggestions, I guess not...;) ):
I was just wondering, whether awk provides a kind of "shift-operator" for the postional params/matches....
ahoffmannCommented:
> .. awk .. "shift-operator"
unfortunately no, at least I don't know of any
sometimes your simply can set a positional parameter "empty, like $3=""; but that is gawk/nawk only
otherwise you have to loop
  for(i=start;i<=NF;i++){$(i-1)=$i;}
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Unix OS

From novice to tech pro — start learning today.