Sponsored Content
Full Discussion: cut & AWK
Top Forums Shell Programming and Scripting cut & AWK Post 302530425 by itkamaraj on Tuesday 14th of June 2011 02:53:19 AM
Old 06-14-2011
give the desired output of your example
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

cut & paste

hi i am new to shell scripting, i have been trying to cut columns numbered 1,4 of a file consisiting of 4 columns. Each column is seperated by 2 spaces. for example: john 6102097199 tennessee usa michel 6734590899 texas USA now, i need to cut the name... (3 Replies)
Discussion started by: t_harsha18
3 Replies

2. Shell Programming and Scripting

awk & cut record separator problem

Hi All, I've got some strange behaviour going on when trying to manipulate a file that contains spaces. My input file looks something like this: xxxxxxxxx,yyyy,sss sss sss,bbbbbbb If I use awk: When running from the command line I get: sss sss sss But when running from a... (7 Replies)
Discussion started by: pondlife
7 Replies

3. Shell Programming and Scripting

grep & cut the file

I need to grep and cut the some file in the folder and output to some file. the sample file looks like below -rw-r--r-- 1 gui gui 28050789 Jun 25 18:38 mymkzpiii.txt -rw-r--r-- 1 gui gui 127983856 Jun 25 18:39 phmnlpiii.txt i need the output like below ... (3 Replies)
Discussion started by: aboorkuma
3 Replies

4. UNIX for Dummies Questions & Answers

cmd sequence to find & cut out a specific string

A developer of mine has this requirement - I couldn't tell her quickly how to do it with UNIX commands or a quick script so she's writing a quick program to do it - but that got my curiousity up and thought I'd ask here for advice. In a text file, there are some records (about half of them)... (4 Replies)
Discussion started by: LisaS
4 Replies

5. Shell Programming and Scripting

storing output from echo & cut into variable

Hi All, Hope someone can advise here as I have been struggling to find a syntax that works here. I have tried a stack of combination I have seed in the forums but I think because I have needed to use "" and `` in the statments another method is found. I am reading in lines with the following... (1 Reply)
Discussion started by: nkwilliams
1 Replies

6. Shell Programming and Scripting

Advice using cut & echo combination commands

Hi, I am cutting data from a fixed length test file and then writing out a new record using the echo command, the problem I have is how to stop multiple spaces from being written to the output file as a single space. Example: cat filea | while read line do field1=`echo $line | cut -c1-2` ... (6 Replies)
Discussion started by: dc18
6 Replies

7. Homework & Coursework Questions

sed & cut command issues

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: After using the egrep command to pull certain lines from the asg5f1 (creating the asg5f1c file), I am required... (1 Reply)
Discussion started by: robrom78
1 Replies

8. Shell Programming and Scripting

Cut & Fetch word from string

I have a file with some SQL query, I want to fetch only Table Name from that file line by line. INPUT FILE SELECT * FROM $SCHM.TABLENAME1; ALTER TABLE $SCHM.TABLENAME1 ADD DateOfBirth date; INSERT INTO $SCHM.TABLENAME1 (CustomerName, Country) SELECT SupplierName, Country FROM $SCHM.TABLENAME2... (2 Replies)
Discussion started by: Pratik Majithia
2 Replies

9. UNIX for Dummies Questions & Answers

Cut & awk

I am using the following code to modify all odd lines in a file: awk 'NR % 2 { print } !(NR % 2)' FWD-1.fas | cut -c5-600 I however, do not want cut to affect the odd lines Any help? (3 Replies)
Discussion started by: Xterra
3 Replies
PIC2GRAPH(1)                                                  General Commands Manual                                                 PIC2GRAPH(1)

NAME
pic2graph - convert a PIC diagram into a cropped image SYNOPSIS
pic2graph [ -unsafe ] [ -format fmt ] [ -eqn delim ] DESCRIPTION
Reads a PIC program as input; produces an image file (by default in Portable Network Graphics format) suitable for the Web as output. Also translates eqn(1) constructs, so it can be used for generating images of mathematical formulae. PIC is a rather expressive graphics minilanguage suitable for producing box-and-arrow diagrams of the kind frequently used in technical papers and textbooks. The language is sufficiently flexible to be quite useful for state charts, Petri-net diagrams, flow charts, simple circuit schematics, jumper layouts, and other kinds of illustration involving repetitive uses of simple geometric forms and splines. Because PIC descriptions are procedural and object-based, they are both compact and easy to modify. The PIC language is fully documented in Making Pictures With GNU PIC, a document which is part of the groff(1) distribution. Your input PIC code should not be wrapped with the .PS and .PE macros that normally guard it within groff(1) macros. The output image will be clipped to the smallest possible bounding box that contains all the black pixels. Older versions of convert(1) will produce a black-on-white graphic; newer ones may produce a black-on-transparent graphic. By specifying command-line options to be passed to convert(1) you can give it a border, force the background transparent, set the image's pixel density, or perform other useful transformations. This program uses pic(1), eqn(1), groff(1), gs(1), and the ImageMagick convert(1) program. These programs must be installed on your system and accessible on your $PATH for pic2graph to work. OPTIONS
-unsafe Run pic(1) and groff(1) in the `unsafe' mode enabling the PIC macro sh to execute arbitrary commands. The default is to forbid this. -format fmt Specify an output format; the default is PNG (Portable Network Graphics). Any format that convert(1) can emit is supported. -eqn delim Change the fencepost characters that delimit eqn(1) directives ($ and $, by default). This option requires an argument, but an empty string is accepted as a directive to disable eqn(1) processing. Command-line switches and arguments not listed above are passed to convert(1). FILES
/usr/share/groff/1.21/tmac/eqnrc The eqn(1) initialization file. ENVIRONMENT
GROFF_TMPDIR The directory in which temporary files will be created. If this is not set pic2graph searches the environment variables TMPDIR, TMP, and TEMP (in that order). Otherwise, temporary files will be created in /tmp. BUGS
Due to changes in the behavior of ImageMagick convert(1) that are both forward and backward-incompatible, mismatches between your pic2graph and convert(1) versions may produce zero-sized or untrimmed output images. For this version of pic2graph you will need a version of convert(1) that supports the -trim option; older versions of pic2graph used -crop 0x0, which no longer has trimming behavior. SEE ALSO
eqn2graph(1), grap2graph(1), pic(1), eqn(1), groff(1), gs(1), convert(1). AUTHOR
Eric S. Raymond <esr@thyrsus.com>, based on a recipe by W. Richard Stevens. Groff Version 1.21 31 December 2010 PIC2GRAPH(1)
All times are GMT -4. The time now is 11:08 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy