Sponsored Content
Top Forums Shell Programming and Scripting Read in numbers from a datafile Post 302771376 by user8 on Wednesday 20th of February 2013 12:46:16 PM
Old 02-20-2013
Assuming that you are interested in the last field of rows containing "Thermal thickness"
Code:
awk '/Thermal thickness/ { Tt = $NF }'

This User Gave Thanks to user8 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

selective positions from a datafile

Hi dear friends, Im writing a shell script which has to select the strings based on the position. but the problem is there is no field seperator. Normally a datafile contains 2000 records (lines) and each line is of size 500 charecters. I want to select the fields from all the lines which... (10 Replies)
Discussion started by: ganapati
10 Replies

2. Shell Programming and Scripting

Combine a datafile with Master datafile, emergent!

Hi guys, my supervisor has asked me to solve the problem in 7 days, I've taken 3 days to think about it but couldn't figure out any idea. Please give me some thoughts with the following problem, I have index.database that has only index date: 1994 1995 1996 1997 1998 1999 I have... (6 Replies)
Discussion started by: onthetopo
6 Replies

3. UNIX for Dummies Questions & Answers

How do I read/find/replace fields in a csv datafile?

hello. I'm somewhat a novice here so please be patient. My stumbling block when loading csvs into ORACLE tables is this: I need to read a csv datafile, check several fields in each line, and if any of stated fields contain A ZERO only then replace it with a null/blank character. I had a... (9 Replies)
Discussion started by: MrCarter
9 Replies

4. Shell Programming and Scripting

Reversing numbers in a datafile of rows and columns

Hello, I've tried searching the forum for an answer to my question, but without any luck... I have a datafile looking simplified as follows: 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 I want to reverse it by rearranging all the numbers from last to... (16 Replies)
Discussion started by: mattings
16 Replies

5. Shell Programming and Scripting

read numbers from file and output which numbers belongs to which range

Howdy experts, We have some ranges of number which belongs to particual group as below. GroupNo StartRange EndRange Group0125 935300 935399 Group2006 935400 935476 937430 937459 Group0324 935477 935549 ... (6 Replies)
Discussion started by: thepurple
6 Replies

6. Shell Programming and Scripting

Help with addition of 2 numbers that are read from a file

I am trying to add free and used memory (so that i can compute percentage used)of remote nodes using shell script. I use the openssh-server,expect tool and ssh script. 1)login.txt (info of nodes): ip1|username|password ip2|username|password . . . 3)sshlogin.sh #!/bin/bash ... (1 Reply)
Discussion started by: marmik1903
1 Replies

7. Shell Programming and Scripting

sorting the datafile in an order given in second datafile

Hi, I have two files: first input file is having 7-8 columns, and second data file is like I want to arrange my datafile1 in the order given in second data file, by comparing the seconddatafile with the second column of first file and print the entire line....also if any... (2 Replies)
Discussion started by: CAch
2 Replies

8. Shell Programming and Scripting

Read numbers from file

I am trying to make a script to read marks from a file then find out how many of them are above 40 (passing marks). However my script is getting stuck at "read num". I dont understand whats the problem. Any help will be much appreciated. #!/bin/bash set -x count=0; countP=0; PASSMK=40... (6 Replies)
Discussion started by: vish6251
6 Replies

9. Programming

Read in numbers from console won't stop at newline.

Hello, I have snippet code from Lippman's <<C++ primer>>. The program is to convert regular decimal (0 ~ 15) numbers to basic hexdecimals. The instruction tells the program will execute by hitting newline at the end. When I tried to run the compiled program, hitting ENTER did not work as... (3 Replies)
Discussion started by: yifangt
3 Replies

10. UNIX for Beginners Questions & Answers

Read a file with decimal numbers in bash

Hello, I have the following script while read id fraction do sambamba -h -f bam -t 10 --subsampling-seed=50 -s $frac ${id}.bam -o ${id}.out.bam done < fraction.txt where fraction.txt has two columns (id,fraction) and 50 rows I am unable to run this as bash is not able to read the second... (2 Replies)
Discussion started by: nans
2 Replies
SHANTY(1)							      Shanty								 SHANTY(1)

NAME
Shanty - Makes a PostScript file from an image and some text. SYNOPSIS
shanty -i image_file [-t text_file] [-o output_file] [-s paper_size] [-d density] [-m margin] [-b background_color] [-x padding] [-n title] [-l orientation] [-rtl] [-btt] [-f font_name] [-altgd] DESCRIPTION
Shanty takes a text file and an image (PNG or JPG) and creates a PostScript file where one pixel in the image becomes one character in the PostScript. OPTIONS
-i, -image Name of the image to load in. JPG and PNG images are supported. This is the only compulsory field. -t, -text Name of the text file to load in, if omitted STDIN is used. -o, -output Name of the PostScript file to produce, if omitted STDOUT is used. -s, -size Size of the paper to work with. This field should be one of: "a0", "a2", "a3", "a4", "a5", "a6", "letter", "broadsheet", "ledger", "tabloid", "legal", "executive" and "36x36". Default is "a4". -d, -density Density of the text. Higher numbers are more dense, default is 1.4. -m, -margin The margins of the page in cm. Default is 1. -b, -background The colour of a backing rectangle to place behind the text. Colours are specified as "R,G,B" with each value between 0 and 255. "off" means no backing colour. Default is "off". -x, -p, -padding Density of the text. Higher numbers are more dense, default is 1.4. -n, -title The title of the output to write as meta-data in the PostScript file. Default is "Shanty output". -l, -orientation The orientation of the paper, can be "portrait", "landscape" or "auto". Default is "auto". -rtl Switch to right-to-left text. -btt Switch to bottom-to-top text. -f, -font Specify font. The font name specified must be visible to the not just make a font magically appear. Default is "Courier-Bold". -altgd If you have problems loading the GD library, try this switch. HOMEPAGE
<http://www.codebunny.org/coding/shanty/> AUTHOR
Duncan Martin <duncan@codebunny.org> ACKNOWLEDGEMENTS
Many thanks to DFB <http://www.cs.nott.ac.uk/~dfb/> and contributors to comp.lang.postscript. Duncan Martin 6 October 2006 SHANTY(1)
All times are GMT -4. The time now is 10:39 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy