Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Using awk to skip record in file Post 302913884 by bazel on Wednesday 20th of August 2014 01:32:51 PM
Old 08-20-2014
Thanks a lot Don, this is definitely a good start. I am doing some reading in order to get a better understanding of UNIX scripting.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

select a record from one file matching from second file using awk

I need help :) I have two input files and I'd like to generate a report based on the two. filea: hostname,account1,password ,account2,password hostname,account1,password hostname,account1,password ,account1,password ,account2,password repeating hostnames are blank fileb: hosta... (7 Replies)
Discussion started by: synmag
7 Replies

2. Shell Programming and Scripting

Skip parsing the header record - Awk

Guys.... Got a scenario in which I need to skip parsing the header record while I do an awk. Does awk has the flexibility to accomplish this?. If so, how do we do this?. Thanks !!! -Anduzzi :) (2 Replies)
Discussion started by: anduzzi
2 Replies

3. Shell Programming and Scripting

AWK to skip comments in XML file

Hello, I'm trying to make a shell script to skip comments from an XML file, but with the code below only deletes comments that are in one line. Can you tell me what can be added here? nawk ' { if($0 !~/<!--/) { a=0 } if($0 ~/<!--/ && $0 ~/-->/) {a=1} if($0 ~/<!--/) {a=1} if... (1 Reply)
Discussion started by: majormark
1 Replies

4. Shell Programming and Scripting

Skip first and last n records with awk

Hi, I have an awk code that reads an input file, checks the 4th column and tells if its fine. #!/bin/ksh { if ($4 == 0) print "fine" else print "some problem" }' FILENAME My problem is that, I dont want to check the first 3 and last 3 lines. This can be hard coded by using BEGIN and END... (9 Replies)
Discussion started by: gotam
9 Replies

5. Shell Programming and Scripting

counting particular record format in a file using AWK

I am trying to count records of particular format from a file and assign it to a variable. I tried below command br_count=wc -l "inputfile.dat"| awk -F"|" '{if (NF != "14") print }' but I amnot able to get it done. Please share me some idea how to get it done. Thanks in advance (7 Replies)
Discussion started by: siteregsam
7 Replies

6. Shell Programming and Scripting

awk-filter record by another file

I have file1 3049 3138 4672 22631 45324 112382 121240 125470 130289 186128 193996 194002 202776 228002 253221 273523 284601 284605 641858 (8 Replies)
Discussion started by: biomed
8 Replies

7. Shell Programming and Scripting

want to skip a line in XML file using awk

HI All, I am trying to split a xml using awk. now the issue is i want to skip three lines from the xml file. first two and last one based on pattern. plz some one help. i am new to awk and struggling :wall: <?xml version="1.0"?> <notification> ..... ..... ..... ..... ........ (24 Replies)
Discussion started by: ganesan kulasek
24 Replies

8. Shell Programming and Scripting

How to compare current record,with next and previous record in awk without using array?

Hi! all can any one tell me how to compare current record of column with next and previous record in awk without using array my case is like this input.txt 0 32 1 26 2 27 3 34 4 26 5 25 6 24 9 23 0 32 1 28 2 15 3 26 4 24 (7 Replies)
Discussion started by: Dona Clara
7 Replies

9. Shell Programming and Scripting

Split a large file in n records and skip a particular record

Hello All, I have a large file, more than 50,000 lines, and I want to split it in even 5000 records. Which I can do using sed '1d;$d;' <filename> | awk 'NR%5000==1{x="F"++i;}{print > x}'Now I need to add one more condition that is not to break the file at 5000th record if the 5000th record... (20 Replies)
Discussion started by: ibmtech
20 Replies

10. Shell Programming and Scripting

Keeping record of file 2 based on a reference file 1 in awk

I have 2 input files (tab separated): file1: make_A 1990 foo bar make_B 2010 this that make_C 2004 these those file2: make_X 1970 1995 ref_1:43 ref_2:65 make_A 1970 1995 ref_1:4 ref_2:21 ref_3:18 make_A 1980 2002 ref_1:7 ref_2:7 ref_3:0 ... (2 Replies)
Discussion started by: beca123456
2 Replies
GLE(1)								   User Manuals 							    GLE(1)

NAME
gle - Graphics Layout Engine SYNOPSIS
gle [options] file.gle ... DESCRIPTION
GLE (Graphics Layout Engine) is a graphics scripting language designed for creating publication quality graphs, plots, diagrams, figures and slides. GLE supports various graph types (function plots, histograms, bar graphs, scatter plots, contour lines, color maps, surface plots, ...) through a simple but flexible set of graphing commands. More complex output can be created by relying on GLE's scripting lan- guage, which is full featured with subroutines, variables, and logic control. GLE relies on LaTeX for text output and supports mathematical formulea in graphs and figures. GLE's output formats include EPS, PS, PDF, JPEG, and PNG. DOCUMENTATION
GLE's documentation is distrubuted in PDF format and can be found at the GLE website: <http://www.gle-graphics.org> OPTIONS
-help Shows help about command line options. -info Outputs software version, build date, GLE_TOP, GLE_BIN, etc.. -verbosity Sets the verbosity level of GLE console output. -device Selects output device(s). -cairo Use cairo output device. -resolution Sets the resolution for bitmap and PDF output. -fullpage Selects full page output. -landscape Selects full page landscape output. -output Specifies the name of the output file. -nosave Don't write output file to disk (dry-run). -preview Previews the output with QGLE. -gs Previews the output with GhostScript. -version Selects a GLE version to run. -compatibility Selects a GLE compatibility mode. -calc Runs GLE in "calculator" mode. -catcsv Pretty print a CSV file to standard output. -tex Indicates that the script includes LaTeX expressions. -inc Creates an .inc file with LaTeX code. -texincprefix Adds the given subdirectory to the path in the .inc file. -mkinittex Creates "inittex.ini" from "init.tex". -nocolor Forces grayscale output. -transparent Creates transparent output (with -d png). -noctrl-d Excludes CTRL-D from the PostScript output. -nomaxpath Disables the upper-bound on the drawing path complexity. -noligatures Disable the use of ligatures for 'fl' and 'fi'. -gsoptions Specify additional options for GhostScript. -safemode Disables reading/writing to the file system. -allowread Allows reading from the given path. -allowwrite Allows writing to the given path. -keep Don't delete temporary files. FILES
/usr/share/gle-graphics/4.2.4c/glerc The system wide configuration file. ~/.glerc Per user configuration file. ENVIRONMENT
GLE_USRLIB The search path for include files. GLE_TOP The location of the fonts and other resources. 4.2.4c JULY 2007 GLE(1)
All times are GMT -4. The time now is 09:48 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy