Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Extracting information from text fields. Post 302120679 by spindoctor on Thursday 7th of June 2007 02:33:33 PM
Old 06-07-2007
For some reason, I really can't get the slash to be removed, but it's no problem.

how would I modify this script to make it perform this command to 100 different files in the same directory i.e. how do I scroll through 100 different files, extracting the 'author' field from each and posting it to one single 'author.txt' file?

Thanks for all your help!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Extracting information from a template

I have a template that I usually use to generate stats on an hourly basis for a number of cell sites altogether. I would like to be able to write a script that would go to the template and extract the information for any single site at any time during the day. For example, let's say that my... (4 Replies)
Discussion started by: Ernst
4 Replies

2. Shell Programming and Scripting

extracting fields

Hi, i have a line with several fields (indefinite number of - count varies) separated by colon. Now, i need to pick each field (except the first one) and have it assigned to variable within a loop. In other words, in the first iteration of the loop, the variable must be assigned with 2nd... (2 Replies)
Discussion started by: prvnrk
2 Replies

3. Shell Programming and Scripting

Problems with extracting information

Hi all, <select name="comp" id="comp" style="width:130px;"> <?php $sqlcomp = mysql_query("SELECT * FROM comp"); while ($redcomp = mysql_fetch_array($sqlcomp)) { extract($redcomp); echo "<option value=\"$comp_id\">comp_name</option>"; } ?> ... (0 Replies)
Discussion started by: c0mrade
0 Replies

4. Shell Programming and Scripting

Extracting information from Config files /text processing

Hello All, This is my first post on this forums, which I consider one of the best of its kind. The reason for my post is that I want to export some information form Nagios configuration files to a DB. I know that there are other tools available to do this, like NDO, monarch, etc... But I want to... (3 Replies)
Discussion started by: oconmx
3 Replies

5. Shell Programming and Scripting

extracting information from multiple files

Hello there, I am trying to extract (string) information ( a list words) from 4 files and then put the results into 1 file. Currently I am doing this using grep -f list.txt file1 . and repeat the process for the other 3 files. The reasons i am doing that (a) I do know how to code (b) each file... (4 Replies)
Discussion started by: houkto
4 Replies

6. Shell Programming and Scripting

Extracting relevant information from syslogs.

I need to analyse some syslogs and I want to print out all the lines containing SSH connections to the inside interface of the firewall and ignore lines where the originating port is 22. So basically I want to print all matches after "to inside:" that contains /22 and ignore lines where /22 occur... (2 Replies)
Discussion started by: lewk
2 Replies

7. Shell Programming and Scripting

Problems extracting some information

Hi there! Well, I'm writing a script to obtain certain information about files. Specifically, I want to get the information about those files which last access were in the last 24 hours, so I'm doing something like this: find <directory_name> -atime -1 -printf '%f %a\n' I would also... (4 Replies)
Discussion started by: Skirmish
4 Replies

8. Shell Programming and Scripting

Extracting information using awk

I want to write a script that extracts a value from a line of text. I know it can be done using awk but I've never used awk before so I don't know how to do it. The text is: Mem: 100M Active, 2150K Cache, 500M Buf, 10G Free I want to extract the free memory value to use as a variable. In... (5 Replies)
Discussion started by: millsy5
5 Replies

9. Shell Programming and Scripting

[Solved] Extracting information from DDL's

Dear Experts, I need your help here. I have lot of teradata DDL's as follows, i want to extract field names , field attributes and NOT NULL information from DDL.Could you please help here. Sample DDL: CREATE MULTISET TABLE APS_CALL_IN_PICKUP_CANCELED ,NO FALLBACK , NO BEFORE... (2 Replies)
Discussion started by: srikanth38
2 Replies

10. Shell Programming and Scripting

Extracting information from XML to excel

Hi, I am trying to extract information from a XML file and write it to a excel sheet. I am not sure where to start from. Here is the content from my input XML file. <com.cloudbees.hudson.plugins.folder.properties.FolderProxyGroupContainer plugin="nectar-rbac@4.5"> <groups> ... (4 Replies)
Discussion started by: Sajjadmehdi
4 Replies
SSTAT(1)							 Slurm components							  SSTAT(1)

NAME
sstat - Display various status information of a running job/step. SYNOPSIS
sstat [OPTIONS...] DESCRIPTION
Status information for running jobs invoked with SLURM. The sstat command displays job status information for your analysis. The sstat command displays information pertaining to CPU, Task, Node, Resident Set Size (RSS) and Virtual Memory (VM). You can tailor the output with the use of the --fields= option to specify the fields to be shown. For the root user, the sstat command displays job status data for any job running on the system. For the non-root user, the sstat output is limited to the user's jobs. Note: the sstat command requires that the jobacct_gather plugin be installed and operational. -a, --allsteps Print all steps for the given job(s) when no step is specified. -e, --helpformat Print a list of fields that can be specified with the '--format' option. -h, --help Displays a general help message. -i, --pidformat Predefined format to list the pids running for each job step. (JobId,Nodes,Pids) -j, --jobs Format is <job(.step)>. Stat this job step or comma-separated list of job steps. This option is required. The step portion will default to lowest step running if not specified, unless the --allsteps flag is set where not specifying a step will result in all running steps to be displayed. NOTE: A step id of 'batch' will display the information about the batch step. -n, --noheader No heading will be added to the output. The default action is to display a header. -o, --format, --fields Comma separated list of fields. (use '--helpformat' for a list of available fields). NOTE: When using the format option for listing various fields you can put a %NUMBER afterwards to specify how many characters should be printed. i.e. format=name%30 will print 30 characters of field name right justified. A -30 will print 30 characters left justified. -p, --parsable output will be '|' delimited with a '|' at the end -P, --parsable2 output will be '|' delimited without a '|' at the end --usage Display a command usage summary. -v, --verbose Primarily for debugging purposes, report the state of various variables during processing. -V, --version Print version. Job Status Fields The following are the field options: AveCPU Average (system + user) CPU time of all tasks in job. AvePages Average number of page faults of all tasks in job. AveRSS Average resident set size of all tasks in job. AveVMSize Average Virtual Memory size of all tasks in job. JobID The number of the job or job step. It is in the form: job.jobstep. MaxPages Maximum number of page faults of all tasks in job. MaxPagesNode The node on which the maxpages occurred. MaxPagesTask The task ID where the maxpages occurred. MaxRSS Maximum resident set size of all tasks in job. MaxRSSNode The node on which the maxrss occurred. MaxRSSTask The task ID where the maxrss occurred. MaxVMSize Maximum Virtual Memory size of all tasks in job. MaxVMSizeNode The node on which the maxvsize occurred. MaxVMSizeTask The task ID where the maxvsize occurred. MinCPU Minimum (system + user) CPU time of all tasks in job. MinCPUNode The node on which the mincpu occurred. MinCPUTask The task ID where the mincpu occurred. NTasks Total number of tasks in a job or step. EXAMPLES
sstat --format=AveCPU,AvePages,AveRSS,AveVMSize,JobID -j 11 25:02.000 0K 1.37M 5.93M 9.0 sstat -p --format=AveCPU,AvePages,AveRSS,AveVMSize,JobID -j 11 25:02.000|0K|1.37M|5.93M|9.0| COPYING
Copyright (C) 2009 Lawrence Livermore National Security. Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). CODE-OCEC-09-009. All rights reserved. This file is part of SLURM, a resource management program. For details, see <http://www.schedmd.com/slurmdocs/>. SLURM is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. SLURM is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. SEE ALSO
sacct(1) sstat 2.3 August 2011 SSTAT(1)
All times are GMT -4. The time now is 01:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy