01-28-2009
melanie,
you've been quite a 'busy beaver' posting to this Forums lately with members providing solutions.
There are plenty of similar posts - try searching and taking a stab at it yourself.
I'm sure if/when you need specific help, someone will be will to help.
Hint: 'man awk'
Good luck.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I am a beginner to sed command, here I have a question about using sed to add a few characters into a token of a string.
For example, I have a file,
sqw:qqq:123124:uiqe
dfd:ccc:12390:dfjis
cde:aaa:21311:dfjsid
and, I want the output to be,
sqw:qqq:123124:uiqe... (4 Replies)
Discussion started by: Julius
4 Replies
2. Shell Programming and Scripting
I want to find duplicates in file on 2nd field i wrote this code:
nawk '{a++} END{for i in a {if (a>1) print}}' temp
Could not find whats wrong with this.
Appreciate help (5 Replies)
Discussion started by: pinnacle
5 Replies
3. Shell Programming and Scripting
I want to sort alphabetically on the first field and sort in descending numerical order on the 2nd field. With a normal "sort -r -n" it does this:
abc ||| 5e-05 ||| bla
abc ||| 3 ||| ble
def ||| 1 ||| abc
def ||| 0.2 ||| def
As you can see it ignores the fact that 5e-05 is actually 0.00005... (1 Reply)
Discussion started by: FrancoisCN
1 Replies
4. Shell Programming and Scripting
Hi Everyone,
($total+=$_) for @record;
assume @record=(1,2,3), so the result is 6.
if @record=("1 3","2 3","3 3"), would like to sum up the 2nd field of this array, the result is 9.
i tried " ($total+=$) for @record ", cannot, please advice.
Thanks
---------- Post updated at 03:45... (1 Reply)
Discussion started by: jimmy_y
1 Replies
5. Shell Programming and Scripting
Hi,
I've internally searched through forums for about 2+ hours. Unfortunately, with no luck. Although I've found some cases close to mine below, but didn't help so much.
Actually, I'm in short with time. So I had to post my case. Hoping that you can help.
I have 2 files,
FILE1
... (0 Replies)
Discussion started by: amurib
0 Replies
6. Shell Programming and Scripting
Hi,
I've internally searched through forums for about 2+ hours. Unfortunately, with no luck. Although I've found some cases close to mine below, but didn't help so much.
Actually, I'm in short with time. So I had to post my case. Hoping that you can help.
I have 2 files,
FILE1
... (1 Reply)
Discussion started by: amurib
1 Replies
7. Shell Programming and Scripting
java....4059... compsite 62u IPv4 170747 TCP *:9400 (LISTEN)
java...... 05... compsite 109u IPv4 171216 TCP *:9401 (LISTEN)
This is Joust formated like this
Please Repace "." with space" "
All are Right Justfied
Output :- 4058 and 05 so that i can kill this (1 Reply)
Discussion started by: pareshpatra
1 Replies
8. Shell Programming and Scripting
I have a requirement to replace "\" with "/" in only the 2nd field of the input file which has 2 fields. The field delimiter is "|"
Sample records from input file:
1\23|\tmp\user
mn\wer|\home\temp
Expected output:
1\23|/tmp/user
mn\wer|/home/temp
I used
sed 's/\\/\//g'
... (2 Replies)
Discussion started by: krishmaths
2 Replies
9. Shell Programming and Scripting
(7 Replies)
Discussion started by: newbie2010
7 Replies
10. UNIX for Dummies Questions & Answers
Hi,
For example:
I have:
HostA,XYZ
HostB,XYZ
HostC,ABC
I would like the output to be:
HostA,HostB: XYZ
HostC:ABC
How can I achieve this?
So far what I though of is: (1 Reply)
Discussion started by: alvinoo
1 Replies
LEARN ABOUT REDHAT
cardmgr
CARDMGR(8) System Manager's Manual CARDMGR(8)
NAME
cardmgr - PCMCIA device manager
SYNOPSIS
cardmgr [-V] [-q] [-d] [-o] [-f] [-v] [-c configpath] [-m modpath] [-p pidfile] [-s stabfile]
DESCRIPTION
Cardmgr monitors PCMCIA sockets for card insertion and removal events. When a card is inserted, cardmgr looks up the card in a database of
known cards. If the card can be identified, appropriate device drivers will be loaded and bound to the card. When a card is ejected, that
card's drivers will be shut down and unloaded if possible. Based on the contents of the PCMCIA card configuration database, cardmgr may
also execute arbitrary commands when appropriate cards are either inserted or removed.
All insertion and removal events, device driver loads and unloads, and startup and shutdown commands are reported in the system log file.
Warnings and errors will also be logged. Current card and device information for each socket is recorded in /var/lib/pcmcia/stab.
Normally, when a card is identified, cardmgr will send a beep to the console. A beep is also generated when a card is successfully config-
ured. A beep of lower pitch is generated if either of these steps fails. Ejecting a card produces a single beep.
When cardmgr receives a SIGHUP signal, it will reload its configuration file. When cardmgr receives a SIGTERM signal, it will shut down
all sockets that are not busy and then exit, but drivers for busy sockets will stay loaded.
If the PCMCIA_OPTS environment variable is set, its contents will be parsed after the main card configuration file is read.
At startup, cardmgr requires that /tmp reside on a filesystem that permits special device files (i.e., a real linux filesystem, that is not
mounted "nodev").
OPTIONS
-V Show version information and exit.
-q Quiet mode: don't beep when cards are inserted.
-v Verbose mode: generates more informational messages during normal operation. Configuration scripts are executed with VERBOSE=y.
-d Follow module dependencies when loading driver modules, by defaulting to use modprobe instead of insmod. Normally, cardmgr will try
using modprobe only after an unsuccessful attempt with insmod.
-f Foreground: do not fork and run as a daemon until after configuring any cards that are already present.
-o One pass: configure cards that are present, then exit. This flag also forces cardmgr to run in the foreground.
-c configpath
Look for the card configuration database and card configuration scripts in the specified directory, instead of /etc/pcmcia.
-m modpath
Look for loadable kernel modules in the specified directory, instead of /lib/modules/`uname -r`.
-p pidfile
Write the PID of the cardmgr process to the specified file, instead of /var/run/cardmgr.pid.
-s stabfile
Write current socket information to the specified file, instead of /var/lib/pcmcia/stab.
FILES
/etc/pcmcia/config Card configuration database
/etc/pcmcia/config.opts Local resource settings for PCMCIA devices
/var/run/cardmgr.pid PID of active cardmgr process
/var/lib/pcmcia/stab Current card and device information for each socket.
AUTHOR
David Hinds - dahinds@users.sourceforge.net
SEE ALSO
pcmcia(5), stab(5), cardctl(8), cardinfo(1).
pcmcia-cs 2001/07/19 23:41:34 CARDMGR(8)