Thread: Find pattern, delete lines below and above
hi,
totally new scripting , use more experienced. have create bash script in particular folder, identify files contain "p_sgsn_session_management" in filename. every 1 of files should find pattern "papu_index 36" , delete pattern (which in 1 line) , delete 42 lines above , 144 lines below. here part of 1 file:
mnc 3
succ_deact_se_ggsn_reset 0
fail_pdp_act_due_no_resp 0
papu_index 36
succ_impl_deact_se_collisions 0
have found topic, couldn't tweak fit want.html code:http://ubuntuforums.org/showthread.php?t=1897438
thanks,
srdjan
walkthrough sed:
http://www.grymoire.com/unix/sed.html
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk [SOLVED] Find pattern, delete lines below and above
Ubuntu
Comments
Post a Comment