Sponsored Content
Full Discussion: filtering the rows in a file
Top Forums Shell Programming and Scripting filtering the rows in a file Post 302496933 by sudharson on Tuesday 15th of February 2011 07:18:17 PM
Old 02-15-2011
filtering the rows in a file

hi all,

please help on this isssue, i have a file which contains something like this

Quote:
########
#server1
########
/var/opt/quest/vas/vasd/.vasd.pid
var/opt/quest/vgp/vasgpd/.vasgpd.pid

#########
#server2
########
grep -i vas
/bin/bash -c ps -ef |grep -i vas

########
#server3
########
/var/opt/quest/vas/vasd/.vasd.pid
var/opt/quest/vgp/vasgpd/.vasgpd.pid
and i want to seprate the servers which has vasd.pid ,i need only server names.

i want output something like this which vasd.pid .

server1
server3
server4
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Command filtering ONLY rows NOT beginning with '*'

I need a command which filters rows ONLY NOT beginning with '*' So far I have following NOT sufficient command, because it does not include ALL possible literals except of '*' grep ^ INPUT_FILE >>OUTPUT_FILE Is it possible to write something like grep NOT ^ INPUT_FILE... (3 Replies)
Discussion started by: ABE2202
3 Replies

2. Shell Programming and Scripting

delete rows in a file based on the rows of another file

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)
Discussion started by: Muthuraj K
2 Replies

3. Shell Programming and Scripting

Filtering rows for first two instances of a value

Kindly help me with this problem: My data looks like this: SNPfile.txt CHR_A BP_A SNP_A CHR_B BP_B SNP_B R2 p-SNP_A p-SNP_B 4 172575323 rs17056855 4 172601079 rs11945883 0.119414 0.049972656 0.031050345 4 172575323 rs17056855 4 ... (2 Replies)
Discussion started by: genehunter
2 Replies

4. UNIX for Dummies Questions & Answers

Filtering a file

I have a list of directories looking something like; /usr/local/1/in /usr/local/1/out /usr/local/1/archive /usr/local/2/in /usr/local/2/out /usr/local/2/archive /usr/local/3/in /usr/local/3/out /usr/local/3/archive Is there a way I can filter the out and archive directories so I... (5 Replies)
Discussion started by: JayC89
5 Replies

5. Shell Programming and Scripting

filtering the log file

Hi i have a log file like example below. I need only one field from below log all other need to be truncated from the log file. 2011-06-13 15:10:53,498 INFO ext.SP->CAL (log point 5) can any body help on this please. Thanks (4 Replies)
Discussion started by: mostwantedkisss
4 Replies

6. UNIX for Dummies Questions & Answers

Filtering records from 1 file based on some manipulation doen on second file

Hi, I am looking for an awk script which should help me to meet the following requirement: File1 has records in following format INF: FAILEd RECORD AB1234 INF: FAILEd RECORD PQ1145 INF: FAILEd RECORD AB3215 INF: FAILEd RECORD AB6114 ............................ (2 Replies)
Discussion started by: mintu41
2 Replies

7. UNIX for Dummies Questions & Answers

merging rows into new file based on rows and first column

I have 2 files, file01= 7 columns, row unknown (but few) file02= 7 columns, row unknown (but many) now I want to create an output with the first field that is shared in both of them and then subtract the results from the rest of the fields and print there e.g. file 01 James|0|50|25|10|50|30... (1 Reply)
Discussion started by: A-V
1 Replies

8. Shell Programming and Scripting

Filtering first file columns based on second file column

Hi friends, I have one file like below. (.csv type) SNo,data1,data2 1,1,2 2,2,3 3,3,2 and another file like below. Exclude data1 where Exclude should be treated as column name in file2. I want the output shown below. SNo,data2 1,2 2,3 3,2 Where my data1 column got removed from... (2 Replies)
Discussion started by: ks_reddy
2 Replies

9. Shell Programming and Scripting

Filtering out rows

# powermt display dev=all .... snipped ... Pseudo name=hdiskpower8 Symmetrix ID=000192602584 Logical device ID=059F state=alive; policy=SymmOpt; priority=0; queued-IOs=0 ============================================================================== ---------------- Host --------------- ... (7 Replies)
Discussion started by: Daniel Gate
7 Replies

10. Shell Programming and Scripting

Moving or copying first rows and last rows into another file

Hi I would like to move the first 1000 rows of my file into an output file and then move the last 1000 rows into another output file. Any help would be great Thanks (6 Replies)
Discussion started by: kylle345
6 Replies
snmpa_supervisor(3erl)					     Erlang Module Definition					    snmpa_supervisor(3erl)

NAME
snmpa_supervisor - A supervisor for the SNMP agent Processes DESCRIPTION
This is the top supervisor for the agent part of the SNMP application. There is always one supervisor at each node with an SNMP agent (mas- ter agent or sub-agent). EXPORTS
start_sub_sup(Opts) -> {ok, pid()} | {error, {already_started, pid()}} | {error, Reason} Types Opts = [opt()] opt() = {db_dir, string()} | ... Starts a supervisor for the SNMP agent system without a master agent. The supervisor starts all involved SNMP processes, but no agent processes. Sub-agents should be started by calling start_sub_agent/3 . db_dir is mandatory. See configuration parameters for a description of the options. start_master_sup(Opts) -> {ok, pid()} | {error, {already_started, pid()}} | {error, Reason} Types Opts = [opt()] opt() = {db_dir, string()} | {config, ConfOpts()} | ... ConfOpts = [conf_opts()] conf_opts() = {dir, string()} | ... Reason = term() Starts a supervisor for the SNMP agent system. The supervisor starts all involved SNMP processes, including the master agent. Sub- agents should be started by calling start_subagent/3 . db_dir is mandatory. dir in config is mandatory. See snmp config for a description of the options. start_sub_agent(ParentAgent,Subtree,Mibs) -> {ok, pid()} | {error, Reason} Types ParentAgent = pid() SubTree = oid() Mibs = [MibName] MibName = [string()] Starts a sub-agent on the node where the function is called. The snmpa_supervisor must be running. If the supervisor is not running, the function fails with the reason badarg . stop_sub_agent(SubAgent) -> ok | no_such_child Types SubAgent = pid() Stops the sub-agent on the node where the function is called. The snmpa_supervisor must be running. If the supervisor is not running, the function fails with the reason badarg . Ericsson AB snmp 4.19 snmpa_supervisor(3erl)
All times are GMT -4. The time now is 04:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy