another sed question...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Looking to change a yml file (yaml is a database type file)

*** from
--- !ruby/object:Right 
attributes: 
  name: Personnel Admin
  action: index
  id: "1"
  controller: assessments
--- !ruby/object:Right 
attributes: 
  name: Personnel Admin
  action: find
  id: "2"
  controller: assessments

*** to
--- !ruby/object:Right 
attributes_1: 
  name: Personnel Admin
  action: index
  id: "1"
  controller: assessments
--- !ruby/object:Right 
attributes_2: 
  name: Personnel Admin
  action: find
  id: "2"
  controller: assessments

where I'm taking the 'id:' field from each record and inserting an
underscore and the id into the 'attributes' label directly above.

Any takers?

Thanks

Craig

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux