Hello, there. I have a file that's a horrible, horrible mess. (Basically, it's an export from a firewall config.) The people who generated the file didn't think that putting a newline in the middle of a hostname would ever be a problem. It is.
Here's an example of the stuff in the file:
... (2 Replies)
Hi. Here's a tricky one (at least to me):
I have a file named theFile.txt (UTF-8) that contains the following:
a
b
cWhen I execute
perl -pe 's|a.*c|d|sg' theFile.txtin bash 3.2 on MAC OS X 10.6, I get no match, i.e. the result is
a
b
cagain. Any clues why? (2 Replies)
Hi all,
i am getting count from oracle 11g by spooling it to a file.
Now there are some newline characters and blank spaces i need to remove these.
pl provide me a awk/sed solution.
the spooled file is attached.
i tried this.. but not getting req o/p (6 Replies)
Hi Guys,
Can someone give me a hand on how I can remove unwanted strings like "<Number>" and "</Number>" and retain only the numbers from the input file below.
INPUT FILE:
<Number>10050000</Number>
<Number>1001340001</Number>
<Number>1001750002</Number>
<Number>100750003</Number>... (8 Replies)
awk , sed Experts,
I want to remove first and last line after pattern match "vg" :
I am trying : # sed '1d;$d' works fine , but where the last line is not having vg entry it is deleting one line of data.
- So it should check for the pattern vg if present , then it should delete the line ,... (5 Replies)
Hi buddy's
my file are like this:
s.no,name,band,sal
1,"suneel",,10
2,"bargav
sand",,20
30,"
ebdug gil",,4
but i want
s.no,name,band,sal
1,"suneel",,10
2,"bargav sand",,20
30,"ebdug gil",,4
any command or Shell script for this.
please help me it's urgent to implement (33 Replies)
I want to list all html files present in a directory tree, the remove the newline and get one string with a space between files
find /home/chrisd/Desktop/seg/geohtml/ -name '*.html' | awk BEGIN{FS=\r} '{print}'
---------- Post updated at 06:47 PM ---------- Previous update was at 06:25 PM... (5 Replies)
the following pattern match works correctly for me
awk '/name="Fruits"/{f=1;next} /"name=Vegetables"/{f=0} f' filename
This works well for me. Id like to temporarily move the match out of the file ( > newfile) and be able to stick it back in the same place at a later time.
Is this... (7 Replies)
In file1 field $18 is removed.... column header is "Otherinfo", then each line in file1 is used to search file2 for a match. When a match is found the last four strings in file2 are copied to file1.
Maybe:
cut -f1-17 file1 and then match each line to file2
file1
Chr Start End ... (6 Replies)
I am trying to remove each line in which $2 is FP or RFP. I believe the below will remove one instance but not both. Thank you :).
file
12
123 FP
11
10 RFP
awk
awk -F'\t' '
$2 != "FP"' file
desired output
12
11 (6 Replies)
Discussion started by: cmccabe
6 Replies
LEARN ABOUT X11R4
lpinfo
lpinfo(8) Apple Inc. lpinfo(8)NAME
lpinfo - show available devices or drivers
SYNOPSIS
lpinfo [ -E ] [ -U username ] [ -h server[:port] ] [ -l ] [ --device-id device-id-string ] [ --exclude-schemes scheme-list ] [ --include-
schemes scheme-list ] [ --language locale ] [ --make-and-model name ] [ --product name ] -m
lpinfo [ -E ] [ -U username ] [ -h server[:port] ] [ -l ] [ --exclude-schemes scheme-list ] [ --include-schemes scheme-list ] [ --timeout
seconds ] -v
DESCRIPTION
lpinfo lists the available devices or drivers known to the CUPS server. The first form (-m) lists the available drivers, while the second
form (-v) lists the available devices.
OPTIONS
lpinfo accepts the following options:
-E
Forces encryption when connecting to the server.
-U username
Sets the username to use when connecting to the server.
-h server[:port]
Selects an alternate server.
-l
Shows a "long" listing of devices or drivers.
--device-id device-id-string
Specifies the IEEE-1284 device ID to match when listing drivers with the -m option.
--exclude-schemes scheme-list
Specifies a comma-separated list of device or PPD schemes that should be excluded from the results. Static PPD files use the "file"
scheme.
--include-schemes scheme-list
Specifies a comma-separated list of device or PPD schemes that should be included in the results. Static PPD files use the "file"
scheme.
--language locale
Specifies the language to match when listing drivers with the -m option.
--make-and-model name
Specifies the make and model to match when listing drivers with the -m option.
--product name
Specifies the product to match when listing drivers with the -m option.
--timeout seconds
Specifies the timeout when listing devices with the -v option.
COMPATIBILITY
The lpinfo command is unique to CUPS.
SEE ALSO lpadmin(8),
http://localhost:631/help
COPYRIGHT
Copyright 2007-2011 by Apple Inc.
5 December 2008 CUPS lpinfo(8)