07-20-2013
It would be better if you posted the script, and a representative sample of the data file here, obfuscating any sensitive data before doing so.
This User Gave Thanks to Scott For This Post:
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a file that has many columns. Let us say "Employee_number" "Employee_name" "Salary". I want to display all entries in a column by giving all or part of the column name. For example if I input "name" I want all the employee names printed. Is it possible to do this in a simple manner... (2 Replies)
Discussion started by: kskkarthik
2 Replies
2. Shell Programming and Scripting
Hi friends ,
I am new to unix ,need your help to fix this
there is a ~ deliminated file. how to find the 5th column of the row.
awk 'print $5 ' abc.txt
it doesnot work . it works for table deliminated file. My data file is like the following manner.
abc.txt
--------
a~b~c~d~e~f... (3 Replies)
Discussion started by: imipsita.rath
3 Replies
3. Shell Programming and Scripting
I have a data in a file like this
1 praveen bmscollege
2 shishira bnmit
3 parthiva geethamce
I want to search "praveen" using awk command i tried like this but i did not get
awk `$2="praveen" {print $0} ` praveen.lst
can anyone help me solving this problem in... (2 Replies)
Discussion started by: praveenhegde
2 Replies
4. Shell Programming and Scripting
I am trying to search a given text in a file and find its last occurrence index. The task is to append the searched index in the same file but in a separate column. I am able to accomplish the task partially and looking for a solution.
Following is the detailed description:
names_file.txt
... (17 Replies)
Discussion started by: tarun.trehan
17 Replies
5. Shell Programming and Scripting
Hi have a large spreadsheet which has 4 columns
APM00111803814 server_2 96085 Corp IT Desktop and Apps
APM00111803814 server_2 96085 Corp IT Desktop and Apps
APM00111803814 server_2 96034 Storage Mgmt Team
APM00111803814 server_2 96152 GWP... (6 Replies)
Discussion started by: kieranfoley
6 Replies
6. Shell Programming and Scripting
Want to search a pattern in column
using the below command which not helpful
awk -F"\|" '$1 == '"${VAR}"' {print $1,$2}' file
how to search using "==" with variable other than the below case.
awk -F"\|" '$1 ~ /'"${VAR}"'/ {print $1,$2}' file (14 Replies)
Discussion started by: Roozo
14 Replies
7. Shell Programming and Scripting
Hello,
I have a comma seperate metadata as follows:
CITY ,COUNTY,STATE,COUNTRY
NEW_YORK,NYC ,NY ,USA
NEWARK ,ESSEX ,NJ ,USA
CHICAGO ,COOK ,IL ,USA
SEATTLE ,MINER ,WA ,USA
In my process, I get two key values ie
CITY NAME (can be one of the... (7 Replies)
Discussion started by: calredd
7 Replies
8. Shell Programming and Scripting
I'm interested to match column pattern through awk using an external variable for data:
-9 1:751343:T:A -9 0 T A 0.726 -5.408837e-03 9.576603e-03 7.967536e-01 5.722312e-01
-9 1:751756:T:C -9 0 T C 0.727 -5.360458e-03 9.579447e-03 7.966977e-01 5.757858e-01... (7 Replies)
Discussion started by: genome
7 Replies
9. Shell Programming and Scripting
Hello,
Similar question to my previous posts. I am sorry for the trouble...
Just checked my old threads but I can not implement any solution into this case..
My aim is to grab each line in fileA, check it in fileB and merge with fileC (tab separated) in corresponding line as given below:
FileA:... (2 Replies)
Discussion started by: baris35
2 Replies
sadc(8) BSD System Manager's Manual sadc(8)
NAME
sadc -- system activity data collector
SYNOPSIS
/usr/lib/sa/sadc [-m mode] [t n] [ofile]
DESCRIPTION
The sadc tool is used to collect cumulative system activity data. The sample system data is collected at intervals t seconds apart, in a
loop n times. The binary sample data is written to ofile if specified. Otherwise, the binary data is written to stdout. If the ofile file
does not exist, it is created, otherwise it is truncated.
sadc is intended to be used as the engine behind the sar(1) command, and is not typically invoked on the command line. Two shell scripts,
sa1 and sa2, are provided to drive the typical sampling, saving, and reporting process.
OPTIONS
The following options modify the way data is collected by sadc.
-m mode Modify the collection of system statistics as specified by mode. Currently only one mode is supported.
PPP By default, the collection of ppp network interface statistics is turned off. This is because the number of ppp connec-
tions can be very high, causing the raw data file to grow unexpectedly large, especially when samples are collected at
short intervals. Use the PPP mode to turn the collection back on.
EXAMPLES
/usr/lib/sa/sadc 15 20 /tmp/sample.out
This call collects 20 samples at 15 second intervals. The binary data is written to the /tmp/sample.out file
FILES
/var/log/sa/sadd Default daily activity file that holds the binary sampling data. dd are digits that represent the day of the month.
/usr/lib/sa/sa1 Shell script used to drive the sar data collection.
/usr/lib/sa/sa2 Shell script used to drive the sar data reporting.
SEE ALSO
fs_usage(1), netstat(1), sar(1), sc_usage(1), top(1), vm_stat(1), iostat(8), sa1(8), sa2(8)
Mac OS X Jul 25 2003 Mac OS X