Script to delete few rows from a file and then update header
I have file with 108 lines in it like above (2 lines) this is having COOLTV , they have other names
I want to open file and remove line which has COOLTV mentioned init and also want to delete immediate next line. these two lines can be any where in the file.
then once it delete in the header it should also update 108 as 106 because we delete 2 lines and it should change 00000418828124201 to 00000514443225 (00000418828124201 - 00137233954 = 00000514443225)
Header after modify should look like
HJKL1Name0001430001060000051444322201
it should keep orginal file there and should make new file will all these changes
106 will be word count and 0000051444322 is remaining after subtracting 00137233954
how can we do it using awk or shell
I am using HP UX and think this may be done with awk but bot sure.
I have a file with a several header records and undeneath many detail records I need to put in the header record the number of detail records above this header record and number of detail records below this header record
Header... (5 Replies)
Hi
I have a file having 1000 rows. Now I would like to remove 10 rows from it. Plz give me the script.
Eg:
input file like
4 1 4500.0 1
5 1 1.0 30
6 1 1.0 4500
7 1 4.0 730
7 2 500000.0 730
8 1 785460.0 45
8 7 94255.0 30
9 1 31800.0 30
9 4 36000.0 30
10 1 15000.0 30... (5 Replies)
I need to delete rows based on the number of lines in a different file, I have a piece of code with me working but when I merge with my C application, it doesnt work.
sed '1,'\"`wc -l < /tmp/fileyyyy`\"'d' /tmp/fileA > /tmp/filexxxx
Can anyone give me an alternate solution for the above (2 Replies)
Hi,
Someone hacked my site(s) and appended a header to every .php file in every domain. With several Word Press sites, you can imagine how many files that is! I hand edited some, but it is just a huge task to edit the thousands of files.
I was a long time Linux scripter, but have not done... (5 Replies)
Hi all,
I have the following input - the unique row key is 1st column
cat file.txt
A response
C request
C response
D request
C request
C response
E request
The desired output should be
C request (7 Replies)
Greetings!
I have been trying to find out a way to take a CSV file with a large number of rows, and a very large number of columns (in the thousands) and convert the rows to a single column of data, where the first row is a header representing the attribute name and the subsequent series of... (3 Replies)
Hello There...
I have a sample input file ..
number:department:amount
125:Market:125.23
126:Hardware store:434.95
127:Video store:7.45
128:Book store:14.32
129:Gasolline:16.10
I will be doing some manipulations on all the records except the header, but the header should always be... (2 Replies)
Hi All,
I am new to UNIX . Please help me in writing code to delete all records from the file where all columns after cloumn 5 in file is either 0, #MI or NULL.
Initial 5 columns are string
e.g.
"alsod" "1FEV2" "wjwroe" " wsse" "hd3" 1 2 34 #Mi
"malasl" "wses" "trwwwe" " wsse" "hd3" 1 2 0... (4 Replies)
Hello.
A find command return a list of file.
For each fileReplace the content starting with the first "§" (of two) ending with last "ɸ" (of two), regardless of the content ( five lines )
by the following content (exactly) :
§2019_08_23§ #
# ... (8 Replies)
Discussion started by: jcdole
8 Replies
LEARN ABOUT CENTOS
ipsec_klipsdebug
IPSEC_KLIPSDEBUG(5) [FIXME: manual] IPSEC_KLIPSDEBUG(5)NAME
ipsec_klipsdebug - list KLIPS (kernel IPSEC support) debug features and level
SYNOPSIS
ipsec klipsdebug
cat/proc/net/ipsec_klipsdebug
DESCRIPTION
/proc/net/ipsec_klipsdebug lists flags that control various parts of the debugging output of KLIPS and MAST, two of the IPsec stacks
supported by Libreswan. At this point it is a read-only file.
A table entry consists of:
+
a KLIPS debug variable
+
a '=' separator for visual and automated parsing between the variable name and its current value
+
hexadecimal bitmap of variable's flags.
The variable names roughly describe the scope of the debugging variable. Currently, no flags are documented or individually accessible yet
except tunnel-xmit.
The variable names are:
tunnel
tunnelling code
netlink
userspace communication code (obsolete)
xform
transform selection and manipulation code
eroute
eroute table manipulation code
spi
SA table manipulation code
radij
radij tree manipulation code
esp
encryptions transforms code
ah
authentication transforms code
rcv
receive code
ipcomp
ip compression transforms code
verbose
give even more information, beware this will probably trample the 4k kernel printk buffer giving inaccurate output
All KLIPS debug output appears as kernel.info messages to syslogd(8). Most systems are set up to log these messages to /var/log/messages.
EXAMPLES
debug_tunnel=00000010.
debug_netlink=00000000.
debug_xform=00000000.
debug_eroute=00000000.
debug_spi=00000000.
debug_radij=00000000.
debug_esp=00000000.
debug_ah=00000000.
debug_rcv=00000000.
debug_pfkey=ffffffff.
means that one tunnel flag has been set (tunnel-xmit), full pfkey sockets debugging has been set and everything else is not set.
FILES
/proc/net/ipsec_klipsdebug, /usr/local/bin/ipsec
SEE ALSO ipsec(8), ipsec_manual(8), ipsec_tncfg(8), ipsec_eroute(8), ipsec_spi(8), ipsec_spigrp(8), ipsec_klipsdebug(5), ipsec_version(5),
ipsec_pf_key(5)HISTORY
Written for the Linux FreeS/WAN project <http://www.freeswan.org/> by Richard Guy Briggs.
[FIXME: source] 10/06/2010 IPSEC_KLIPSDEBUG(5)