04-29-2013
Don,
Sorry for the delay. I just had a chance to try your solution. I had a few typos which resulted in syntax errors. After debugging, the script was able to execute. It is strange that awk complained about the single quote before BEGIN. It didn't appear to delete the user from the redundant group. Any ideas? I will post the edited script. I appreciate your time and awk expertise.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have searched the forum for this - forgive me if I missed a previous post.
I have the following file:
blah blah blah
blah blah blah
blah blah blah
blah blah blah
blah blah blah
alter table "informix".esc_acct add constraint (foreign key (fi_id)
references "informix".fi ... (5 Replies)
Discussion started by: Shoeless_Mike
5 Replies
2. Shell Programming and Scripting
Hi guys,
I need to remove the pattern (ID=180), one line before and four lines after.
Thanks. (5 Replies)
Discussion started by: ashimada
5 Replies
3. Shell Programming and Scripting
Hi Everyone,
# cat 1
a
b b
cc
1
2
3 3 3
4
55 5
a
b (2 Replies)
Discussion started by: jimmy_y
2 Replies
4. Shell Programming and Scripting
Input:
3456 565
656 878
235 8
4 8787
3 7
35 878
Expected output:
3456 565
656 878
235 8
4 8787
3 7
35 878
How can i do this with awk,sed and perl? (10 Replies)
Discussion started by: cola
10 Replies
5. Shell Programming and Scripting
Input:
hello hello
hello hello
monkey
donkey
hello hello
drink
dance
drink
Output should be:
hello hello
monkey
donkey
drink
dance (9 Replies)
Discussion started by: cola
9 Replies
6. Shell Programming and Scripting
Hi, I'm writing a ksh script and trying to use an awk / sed / or perl one-liner to remove the last 4 characters of a line in a file if it begins with a period.
Here is the contents of the file... the column in which I want to remove the last 4 characters is the last column. ($6 in awk). I've... (10 Replies)
Discussion started by: right_coaster
10 Replies
7. Shell Programming and Scripting
hi..
i have a fasta file with the following format
>sequence1
CCGGTTTTCGATTTGGTTTGACT
>sequence2
AAAGTGCCGCCAGGTTTTGAGTGT
>sequence3
AGTGCCGCAGAGTTTGTAGTGT
Now, i want to read alternate line and add "GGGGGGGGGGG" to end of every sequence
Desired output:
>sequence1... (4 Replies)
Discussion started by: empyrean
4 Replies
8. Shell Programming and Scripting
OSX
I have been grinding my teeth on a portion of code. I am building a bash script that edits a html email template. In the template, I have place holders for SED (or whatever program is appropriate) to use as anchors for find and replace, with user defined corresponding html code. The HTML code... (3 Replies)
Discussion started by: sudo
3 Replies
9. Shell Programming and Scripting
Dear group,
I have following input text file:
Brit 2016 11 18 12 00 10 1.485,00 EUR
Brit 2016 11 18 12 00 10 142,64 EUR
Brit 2016 11 18 12 00 10 19,80 EUR
Brit 2016 11 18 12 00 10 545,00 EUR
Brit 2016 11 18 12 00 10 6.450,00 EUR... (3 Replies)
Discussion started by: gfhsd
3 Replies
10. UNIX for Beginners Questions & Answers
In the awk piped to sed below I am trying to format file by removing the odd xxxx_digits and whitespace after, then move the even xxxx_digit to the line above it and add a space between them. There may be multiple lines in file but they are in the same format. The Filename_ID line is the last line... (4 Replies)
Discussion started by: cmccabe
4 Replies
LEARN ABOUT DEBIAN
pagermap
PAGERMAP(5) File Formats Manual PAGERMAP(5)
NAME
pagermap - SNPP pager identifier mapping file
DESCRIPTION
The file etc/pagermap (by default) is used by the SNPP support in hfaxd(8) to map pager identifiers specified with the PAGE directive to
IXO/TAP or SMS service providers and optionally a Pager Identification Number (PIN). (The ability to specify a PIN makes it possible to
define aliases for pagers.) Note that etc/pagermap may be called a different name; the filename is specified with the PagerIDMapFile con-
figuration parameter read by hfaxd(8).
The pagermap file is comprised of one or more lines of the following format:
<pattern> <dialstring>[/<pin>]
Each line specifies a <pattern> that is matched against a client-specified pager identifier string. A pattern may be a plain string or a
POSIX 1003.2 extended regular expression; plain strings must compare exactly while regular expressions are unanchored and any substring
match constitutes a ``hit''. Regular expressions are distinguished from plain strings by the presence of one or more of the magic charac-
ters ``[]*.^$-+{}()''. The <dialstring> identifies the IXO/TAP or SMS service provider to contact for delivery or, if <dialstring> is the
string ``reject'' (case insensitive) then the pager identifier is rejected. If the optional <pin> is specified then it used to deliver the
page instead of the client-specified identifier.
If the matching expression is a regular expression the optional <pin> may reference the entire string matched by the regular expression
with the ``&'' character. Substrings matched with the ``(...)'' constructs may be referenced by using ``
'' where n is a single numeric
digit between 1 and 9 that refers to the n-th matched substring; c.f. re_format(7), sed(1), etc.
hfaxd processes lines in the mapping file sequentially; the first line with a pattern that matches the pager identifier is used to deliver
or reject the page. Lines that begin with a ``#'' are treated as comments and discarded. Leading whitespace on a line is also ignored.
EXAMPLES
The following defines an alias for ``sam'', submits all destinations with a leading ``Sky'' to a particular IXO/TAP service provider, and
otherwise rejects the pager ID. (Note that using alphabetics in dial strings requires a dialstring rules file that understands how to map
alphabetics to key codes--or one that passes them through verbatim.)
# a simple mapping example
sam 5551212/99
Sky(.*) 1800SkyTel/1
.* reject
SEE ALSO
hfaxd(8), hylafax-server(5)
May 8, 1996 PAGERMAP(5)