Skip to main content

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
html code:
http://ubuntuforums.org/showthread.php?t=1897438
, couldn't tweak fit want.

thanks,
srdjan



Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk [SOLVED] Find pattern, delete lines below and above


Ubuntu

Comments

Popular posts from this blog

Thread: Can not create raid array: mdadm: no raid-devices specified.

Thread: HOW TO: Package and theme GTK+ / Gtkmm apps in Linux for Windows

Thread: Twinview issues