Sponsored Content
Top Forums Shell Programming and Scripting Display lines of the file on a log Post 302170692 by cfajohnson on Tuesday 26th of February 2008 12:19:25 PM
Old 02-26-2008
Quote:
Originally Posted by sbryant
Hi,

I am using the Korn shell script to display lines of the file. For example below:

outputfile=test.dat

-- display each line of the test.dat file
abcd 345
adek 45566
dve3 34565
so on...

I appreciate your time to find a command for displaying lines of the file on the log.

It's not clear what you want.

If you want to display the lines of a file, use cat or a pager such as more or less.

If you want to copy it to another file, use cp.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

display few lines of the file

Hi, If I want to have a look at few lines of the file, how do I, what command to use. Eg: If I have a file having length 2000 lines and I want to have a look at the content between 1400 and 1600, How do I look at it ? Also, If I want to have a look at function alone in a file, how do I go... (4 Replies)
Discussion started by: sharuvman
4 Replies

2. UNIX for Dummies Questions & Answers

display a portion of lines from file

This is truly dummy question. I have a text file of 100 lines. What unix commnad to extract line 20 to 40 and output it to another file? Is it something cat or grep or >> ? Thanks (6 Replies)
Discussion started by: champion
6 Replies

3. Shell Programming and Scripting

Display file without # lines

Hi to all in this great forum, im sure this has been asked lots of times before but ive been looking for the past day and cant find the answer. I use cat/some/file to display its contents but how can i get it to not display hashed out lines, or do i need another command, Thanks in advance:) (5 Replies)
Discussion started by: dave123
5 Replies

4. Shell Programming and Scripting

grep and display lines from a file

I have to grep on a few words in a file and then display the line containing those words and the line above it. For ex - File1.txt contains... abc xyz abc This is a test Test successful abc xyz abc Just a test Test successful I find the words 'Test successful' in the file... (6 Replies)
Discussion started by: user7617
6 Replies

5. Shell Programming and Scripting

Parse a file to display lines containing a word

Hi! I'm trying to create a shell script to parse a file which might have multiple lines matching a pattern (i.e. containing some word). I need to return all lines matching the pattern, but stripping the contents of that line until the pattern is matched For example, if my input file was ... (4 Replies)
Discussion started by: orno
4 Replies

6. UNIX for Dummies Questions & Answers

Display only the first two characters of all the lines from a file.

how do i Display only the first two characters of all the lines from a file.? (1 Reply)
Discussion started by: ritusubash
1 Replies

7. UNIX Desktop Questions & Answers

How to display only the lines from a file which do not contain a given number

a. How do I display the content of the file containing what Ive merged using a filter which would display only the lines of the file which don't contain number, for example 3 or 6. (3 Replies)
Discussion started by: herberwz
3 Replies

8. Shell Programming and Scripting

Display specific lines content from the file

Hell, I want to grep certain word from file and display above 2 lines and after two lines. Here is the content of sample file. Mar 14, 2013 12:56:59 AM Agent.Agent SendTo INFO: Connection to server:7041 - Credential Transmit Successesful Mar 14, 2013 8:54:21 AM cgent SendTo WARNING:... (7 Replies)
Discussion started by: balareddy
7 Replies

9. Shell Programming and Scripting

To display last 5 lines of a file

Hi Guys, I want to echo last 5 lines of a file to a mail. My script getting continuously looped and not getting the output. can anyone help? #!/bin/bash read karthick; tail -5 $karthick; echo $karthick | mail -s "genius" someone@gmail.com Thanks NK (2 Replies)
Discussion started by: Karthick N
2 Replies

10. Shell Programming and Scripting

Display lines for a particular year in a file using grep

hi, I have a log file with data for more than 3 years, i want only the rows for the year 2017, say for example. My file has the data like this 08-OCT-2015 11:17:35 AAA, BBBB 08-OCT-2017 11:17:35 AAA,Bdfdfd,dfdfd,dfd 08-Nov-2017 11:17:35 AAA,Bdfdfd,dfdfd,deree i want the rows... (2 Replies)
Discussion started by: skoshekay
2 Replies
MUPLOT(1)							   User Commands							 MUPLOT(1)

NAME
muplot - plot a multi-curve figure from multiple data by using Gnuplot SYNOPSIS
muplot [OPTION]... [STYLE] [FILE] [AXES] [FILE] [AXES] ... DESCRIPTION
Muplot is a simple, non-interactive gnuplot-wrapper to plot a multi-curve figure from multiple data (files). It can produce PostScript, PDF, PNG or JPEG output file formats. OPTIONS
--help|-H display help --version output version and license message -h display short help -V print program version number -s create PostScript file -S send PostScript output to STDOUT (the same as '-s -o -') -n create PNG file -j create JPEG file -p create PDF file (requires the gnuplot "pdfcairo" driver) -c <cmd> execute gnuplot command(s) (the default plot style is used) -m monochrome plot (valid only for PostScript) -l set plot size to 800x600 (valid for PNG and JPEG) -o base name of the output file -q quiet mode (all messages except errors to be suppressed) -i ignore local command file './.muplotset' -I <file> specify an alternative command file instead of './.muplotset' Styles: l lines p points lp lines and points (default) pp circle points d dots b boxes g grid e errorbars - default used columns are 1:2:3 (x:y:yerror) a fields with arrows; The data file has a special format in this case. Use 'prefield' to prepare such data files. dt=<fmt> date/time series with the specified format; For example: dt="%H:%M.%S@%H:%M" where the first part, in front of "@", defines the data format, and the second part defines the format that will be used for tic labels. Here, hours and minutes are separated by `:', respectively minutes and seconds by `.' Another example could be a date: dt="%Y-%m-%d". u=<fmt> user specified format as defined in Gnuplot Axes: x:y,x:y-z columns in the file defining the x/y-axes of the curve(s); Default are 1:2 or 1:2:3 for data with errors. In case that only one col- umn is provided the default axes are 0:1 - the x-axis will be a simple index then. File(s) could be a single file name whereas '-' means <stdin>, many files enclosed in '' or "" like "file1 file2 file3", or any valid shell pattern as for example "*.dat". The files '$HOME/.muplotset' and './.muplotset', if existing, will be included at the beginning of the gnu- plot script. The command block between "#BEGIN" and "#END" in those files will be pasted to the end of the script. If you want that the global '$HOME/.muplotset' is ignored, create in your local directory a file named '.muplotset.noglobal'. In case you want to view the out- put, define the env variable MUPLOT_VIEWER and export it, for example: MUPLOT_VIEWER="xpdf -z page"; export MUPLOT_VIEWER Then the program will prompt you to view the plot, and after confirmation the viewer will present the graphics. If the postscript file for- mat is chosen ('-s' option), and MUPLOT_VIEWER is not defined, the viewer is preset to 'gv', and per default you are prompted to view the output. To disable this behavior, set MUPLOT_VIEWER="". EXAMPLES
1) On X-terminal view a multi-curve plot of data files with extension 'dat' muplot l "*.dat" 2) Print a sinus curve in black-and-white color on a PostScript printer muplot -m -S -c "set title 'Function f(x)=sin(x)'; plot sin(x);" | lpr 3) Plot data from file "example.dat" using columns 1:2, 3:4, and 3:5 as x/y-axes in the multi-curve plot; a PostScript file with the name "example.ps" is automatically created. muplot -s lp example.dat 1:2,3:4-5 4) Create graphics in PDF format reading data from file "example.1.dat" (columns 1:2), and from file "example.2.dat" (columns 3:4) muplot -p lp example.1.dat 1:2 example.2.dat 3:4 5) View data where the third column is a date of the form 'yyyy-mm-dd' cat example_counts_per_day.dat | muplot dt="%Y-%m-%d" - 3:1 REPORTING BUGS
Report bugs to <gnu@mirendom.net> COPYRIGHT
Copyright (C) 1996-2009, 2011-2012 Dimitar Ivanov License: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. muplot 3.2.1 February 2012 MUPLOT(1)
All times are GMT -4. The time now is 03:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy