Sponsored Content
Top Forums Shell Programming and Scripting Sar -u generates multiple column headers in csv file Post 302791965 by a1_win on Tuesday 9th of April 2013 01:37:31 PM
Old 04-09-2013
Thanks Ahamed! This is working as per the expected output!

Please let me know what is meant by "OFS=," in the shell script you updated as above

Thanks for your time!

Regards,
a1_win
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Option in sql script to include column headers when spooling file to .csv format

Can anyone help me how to include COLUMN HEADER when spooling file to .CSV format through SQL statement. Thanks, Akbar (4 Replies)
Discussion started by: s1a2m3
4 Replies

2. Shell Programming and Scripting

Merging of files with different headers to make combined headers file

Hi , I have a typical situation. I have 4 files and with different headers (number of headers is varible ). I need to make such a merged file which will have headers combined from all files (comman coluns should appear once only). For example - File 1 H1|H2|H3|H4 11|12|13|14 21|22|23|23... (1 Reply)
Discussion started by: marut_ashu
1 Replies

3. Shell Programming and Scripting

Combine Multiple text or csv files column-wise

Hi All I am trying to combine columns from multiple text files into a single file using paste command but the record length being unequal in the different files the data is running over to the closest empty cell on the left. Please see below. What can i do to resolve this ? File 1 File... (15 Replies)
Discussion started by: venky_ibm
15 Replies

4. Shell Programming and Scripting

Multiple headers in a file

Hi , I have a .txt file in which I have multiple headers, the header record starts with $ symbol...like the first column name is $Account. I have to keep the header in the first line and delete all the remaining headers which are in the file. I tried using sort adc.txt | uniq -u , but my... (7 Replies)
Discussion started by: gaur.deepti
7 Replies

5. UNIX for Dummies Questions & Answers

Using sed command to remove multiple instances of repeating headers in one file?

Hi, I have catenated multiple output files (from a monte carlo run) into one big output file. Each individual file has it's own two line header. So when I catenate, there are multiple two line headers (of the same wording) within the big file. How do I use the sed command to search for the... (1 Reply)
Discussion started by: rebazon
1 Replies

6. Shell Programming and Scripting

Insterting column in csv from multiple files

Hello, I have a spec file that contains a lot of strings that looks like this: PC DELL OptiPlex 3010MT i3 3220/2GB/500GB/DVD-RW/FREE DOS / 5Y NBD Intel i3 3220 (Dual Core, 3.30GHz, 3MB, w/ HD2500 Graphics), 2GB (1x2GB) DDR3 PC3-1600MHz, 500GB HDD SATA III 7200rpm, DVD+/-RW (16x),... (9 Replies)
Discussion started by: g9100
9 Replies

7. Shell Programming and Scripting

Checking data in csv file after headers

I had a requirement to check if data exists after headers (typically row 2 & so on) in csv file. please help how we can check through shellscript in linux. Thank you !! (1 Reply)
Discussion started by: chandu123
1 Replies

8. Shell Programming and Scripting

Compare 2 files of csv file and match column data and create a new csv file of them

Hi, I am newbie in shell script. I need your help to solve my problem. Firstly, I have 2 files of csv and i want to compare of the contents then the output will be written in a new csv file. File1: SourceFile,DateTimeOriginal /home/intannf/foto/IMG_0713.JPG,2015:02:17 11:14:07... (8 Replies)
Discussion started by: refrain
8 Replies

9. Shell Programming and Scripting

Row bind multiple csv files having different column headers

All, I guess by this time someone asked this kind of question, but sorry I am unable to find after a deep search. Here is my request I have many files out of which 2 sample files provided below. File-1 (with A,B as column headers) A,B 1,2 File-2 (with C, D as column headers) C,D 4,5 I... (7 Replies)
Discussion started by: ks_reddy
7 Replies

10. UNIX for Beginners Questions & Answers

How do I extract specific column in multiple csv files?

file1: Name,Threshold,Curr Samples,Curr Error%,Curr ART GETHome,100,21601,0.00%,47 GETregistry,100,21592,0.00%,13 GEThomeLayout,100,30466,0.00%,17 file2: Name,Threshold,Curr Samples,Curr Error%,Curr ART GETHome,100,21601,0.00%,33 GETregistry,100,21592,0.00%,22... (6 Replies)
Discussion started by: Raghuram717
6 Replies
MYSQLSERVERINFO(1)						  MySQL Utilities						MYSQLSERVERINFO(1)

NAME
mysqlserverinfo - Display common diagnostic information from a server SYNOPSIS
mysqlserverinfo [options] DESCRIPTION
This utility displays critical information about a server for use in diagnosing problems. The information displayed includes the following: o Server connection information o Server version number o Data directory path name o Base directory path name o Plugin directory path name o Configuration file location and name o Current binary log coordinates (file name and position) o Current relay log coordinates (file name and position) This utility can be used to see the diagnostic information for servers that are running or offline. If you want to see information about an offline server, the utility starts the server in read-only mode. In this case, you must specify the --basedir, --datadir, and --start options to prevent the utility from starting an offline server accidentally. Note: Be sure to consider the ramifications of starting an offline server on the error and similar logs. It is best to save this information prior to running this utility. To specify how to display output, use one of the following values with the --format option: grid (default) Display output in grid or table format like that of the mysql monitor. csv Display output in comma-separated values format. tab Display output in tab-separated format. vertical Display output in single-column format like that of the G command for the mysql monitor. To turn off the headers for csv or tab display format, specify the --no-headers option. To see the common default settings for the local server's configuration file, use the --show-defaults option. This option reads the config- uration file on the machine where the utility is run, not the machine for the host that the --server option specifies. To run the utility against several servers, specify the --server option multiple times. In this case, the utility attempts to connect to each server and read the information. To see the MySQL servers running on the local machine, use the --show-servers option. This shows all the servers with their process ID and data directory. On Windows, the utility shows only the process ID and port. OPTIONS
mysqlserverinfo accepts the following command-line options: --help Display a help message and exit. --basedir=<basedir> The base directory for the server. This option is required for starting an offline server. --datadir=<datadir> The data directory for the server. This option is required for starting an offline server. --format=<format>, -f<format> Specify the output display format. Permitted format values are grid, csv, tab, and vertical. The default is grid. --no-headers, -h Do not display column headers. This option applies only for csv and tab output. --port-range=<start:end> The port range to check for finding running servers. This option applies only to Windows and is ignored unless --show-servers is given. The default range is 3306:3333. --server=<server> Connection information for a server in <user>[:<passwd>]@<host>[:<port>][:<socket>] format. Use this option multiple times to see information for multiple servers. --show-defaults, -d Display default settings for mysqld from the local configuration file. It uses my_print_defaults to obtain the options. --show-servers Display information about servers running on the local host. The utility examines the host process list to determine which servers are running. --start, -s Start the server in read-only mode if it is offline. With this option, you must also give the --basedir and --datadir options. --verbose, -v Specify how much information to display. Use this option multiple times to increase the amount of information. For example, -v = verbose, -vv = more verbose, -vvv = debug. --version Display version information and exit. For the --format option, the permitted values are not case sensitive. In addition, values may be specified as any unambiguous prefix of a valid value. For example, --format=g specifies the grid format. An error occurs if a prefix matches more than one valid value. EXAMPLES
To display the server information for the local server and the settings for mysqld in the configuration file with the output in a vertical list, use this command: $ mysqlserverinfo --server=root:pass@localhost -d --format=vertical # Source on localhost: ... connected. ************************* 1. row ************************* server: localhost:3306 version: 5.1.50-log datadir: /usr/local/mysql/data/ basedir: /usr/local/mysql-5.1.50-osx10.6-x86_64/ plugin_dir: /usr/local/mysql-5.1.50-osx10.6-x86_64/lib/plugin config_file: /etc/my.cnf binary_log: my_log.000068 binary_log_pos: 212383 relay_log: None relay_log_pos: None 1 rows. Defaults for server localhost:3306 --port=3306 --basedir=/usr/local/mysql --datadir=/usr/local/mysql/data --server_id=5 --log-bin=my_log --general_log --slow_query_log --innodb_data_file_path=ibdata1:778M;ibdata2:50M:autoextend #...done. COPYRIGHT
Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. This program 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; version 2 of the License. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MER- CHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA AUTHOR
MySQL Utilities Team COPYRIGHT
2010, Oracle and/or its affiliates. All rights reserved. 1.0.3 May 09, 2012 MYSQLSERVERINFO(1)
All times are GMT -4. The time now is 01:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy