06-25-2006
To remove it:
$cat > remove
#! /bin/bash
coma=IFS
IFS=","
for i in`cat file.txt`
do
if [ `echo $i` = <chain you like to delete> ]
then
echo $i >> file2.txt
fi
done
IFS=$coma
unset coma
Remember that
OUTPUT file.txt
'/ttt/aaa','/ttt/bbb','/ttt/ccc','/ttt/ddd','/ttt/eee',
OUTPUT file2.txt
'/ttt/aaa'
'/ttt/bbb'
'/ttt/ccc'
'/ttt/ddd'
'/ttt/eee'
Bye
Last edited by Doc_RuNNeR; 06-25-2006 at 06:53 PM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I want to write a shell script which increments a particular column in a row from a text file and then adds another row below the current row with the incremented value .
For Eg .
if the input file has a row :
abc xyz lmn 89 lm nk o p
I would like the script to create something like... (9 Replies)
Discussion started by: aYankeeFan
9 Replies
2. Shell Programming and Scripting
Dear friends,
Below is my program and current output. I wish to have 3 or 4 column output in order to accomodate in single page. i do have subsequent command to process after user enter the number.
Program
COUNT=1
for MYDIR in `ls /`
do
VOBS=${MYDIR}
echo "${COUNT}. ${MYDIR}"
... (4 Replies)
Discussion started by: baluchen
4 Replies
3. Shell Programming and Scripting
Hello,
I have an input file like the following:
11_3_4
2_1_35
3_15__
_16989
Where '_' is a space. The data is in a table. Is there a way for the program to prompt the user for x1,y1 and x2,y2, where x1,y1 is the desired number (for example x=6 y=4 is a value of 4) and move to a desired spot... (2 Replies)
Discussion started by: jl487
2 Replies
4. Shell Programming and Scripting
Hi Friends,
I have a single column data like below.
1
2
3
4
5
I need the output like below.
0
1
2
3
4
where each row (including first row) subtracting from first row and the result should print below like the way shown in output file.
Thanks
Sid (11 Replies)
Discussion started by: ks_reddy
11 Replies
5. Shell Programming and Scripting
Hi Guys,
Input.txt
L194 A -118.2
L194 B -115.1
L194 C -118.7
L196 A 0
L196 C 0
L197 A -111.2
L197 B -118.9
L197 C -119.9
L199 A -120.4
L199 B -119.9 ... (2 Replies)
Discussion started by: asavaliya
2 Replies
6. UNIX for Dummies Questions & Answers
file with this content
awk 'NR==1 {print $4} && NR==2 {print $5}' file
The error is shown with syntax error; what can be done (4 Replies)
Discussion started by: cdfd123
4 Replies
7. Shell Programming and Scripting
Hi,
I have the following file,
chr1 100 200 20
chr1 201 300 22
chr1 220 345 23
chr1 230 456 33.5
chr1 243 567 90
chr1 345 600 20
chr1 430 619 21.78
chr1 870 910 112.3
chr1 914 920 12
chr1 930 999 13
My output would be
peak1 20 22 23 33.5 90
peak2 20 21.78 112.3 12 13
Here the... (3 Replies)
Discussion started by: jacobs.smith
3 Replies
8. Shell Programming and Scripting
Dear All,
I have input :
SEG901 5173 9005 5740
SEG902 5227 5284
SEG903 5284 5346
SEG904 5346 9010
SEG905 5400 5456
SEG906 5456 5511
SEG907 5511 9011
SEG908 5572 9015
SEG909 5622 9020
SEG910 5678 5739
SEG911 5739 5796
SEG912 5796 9025 ... (3 Replies)
Discussion started by: attila
3 Replies
9. Shell Programming and Scripting
I have a table with this structure:
cola colb colc
1 19 lemon
20 31 lemon
32 100 lemon
159 205 cherries
210 500 cherries
and need to parse it into this format:
cola colb colc
1 100 lemon
159 500 cherries
So I need the first row of cola and the last row of colb if colc has the... (3 Replies)
Discussion started by: coppuca
3 Replies
10. Shell Programming and Scripting
Hi Experts,
In short : Need to split file when field in column 5 is blank and need to generate two file in which column 5 is blank and other in which column 5 has values along with other rows and column data
My issue is i am not able to get header for column from raw file into new file which... (1 Reply)
Discussion started by: as7951
1 Replies
PFLOG(4) BSD Kernel Interfaces Manual PFLOG(4)
NAME
pflog -- packet filter logging interface
SYNOPSIS
device pflog
DESCRIPTION
The pflog interface is a pseudo-device which makes visible all packets logged by the packet filter, pf(4). Logged packets can easily be mon-
itored in real time by invoking tcpdump(1) on the pflog interface, or stored to disk using pflogd(8).
The pflog0 interface is created automatically at boot if both pf(4) and pflogd(8) are enabled; further instances can be created using
ifconfig(8).
Each packet retrieved on this interface has a header associated with it of length PFLOG_HDRLEN. This header documents the address family,
interface name, rule number, reason, action, and direction of the packet that was logged. This structure, defined in <net/if_pflog.h> looks
like
struct pfloghdr {
u_int8_t length;
sa_family_t af;
u_int8_t action;
u_int8_t reason;
char ifname[IFNAMSIZ];
char ruleset[PF_RULESET_NAME_SIZE];
u_int32_t rulenr;
u_int32_t subrulenr;
uid_t uid;
pid_t pid;
uid_t rule_uid;
pid_t rule_pid;
u_int8_t dir;
u_int8_t pad[3];
};
EXAMPLES
Create a pflog interface and monitor all packets logged on it:
# ifconfig pflog1 up
# tcpdump -n -e -ttt -i pflog1
SEE ALSO
tcpdump(1) inet(4), inet6(4), netintro(4), pf(4), ifconfig(8), pflogd(8)
HISTORY
The pflog device first appeared in OpenBSD 3.0.
BSD
December 10, 2001 BSD