Sponsored Content
Top Forums Shell Programming and Scripting Spacing off when files combined using awk or cat Post 302963643 by RudiC on Monday 4th of January 2016 02:37:30 PM
Old 01-04-2016
Not the slightest idea what your problem is. Where does the combined output come into play? I can't find any of those lines in your desired output. What does "spacing is off" mean?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Awk not printing the last combined column

nawk -F "|" 'FNR==NR {a=$2 OFS $3 OFS $4 OFS $5 OFS $6;next}\ {if ($5 in a)print $1,"test",$5,a, $2,$3,$4 OFS OFS OFS OFS OFS OFS OFS OFS $2-$3-$4 ; \ else print $1,"Database",$5 OFS OFS OFS OFS OFS OFS $2,$3,$4 OFS OFS OFS OFS OFS OFS OFS OFS $2-$3-$4 }' OFS="|" \ file1 file2 > file3 This... (5 Replies)
Discussion started by: pinnacle
5 Replies

2. UNIX for Dummies Questions & Answers

Combined many txt files by columns

Hi, I want to combined 500 .txt files (each file only has one line) to a single txt file (A.txt). for example, A1.txt with 12 23 34 45 A2.txt with 56 67 78 89 ...etc, so I have A1.txt, A2.txt... , A499.txt, A500.txt (1 Reply)
Discussion started by: AMBER
1 Replies

3. 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

4. Shell Programming and Scripting

Cat 114 files using grep or awk to pull muliple fields

Files xxxxxxx.txt ------------------------------------------------------------------------------------------------------------------------------------ Req.By: xxxxxxx WABUSH MINES - xxxxxx MINE (1001) Page: 1 Run on: 12/14/09... (4 Replies)
Discussion started by: sctxms
4 Replies

5. UNIX for Dummies Questions & Answers

awk for scientific notion and decimal combined data

Dea all, I have a question. I have a column of numbers with scientific notion and decimal combined data. I want to print it only if the number <0.05 using awk. however the very small numbers with scientific notion is not selected. Do any one know how to solve it? Thanks! example as below: ... (4 Replies)
Discussion started by: forevertl
4 Replies

6. Shell Programming and Scripting

awk or sed: change the color of a column w/o screwing up column spacing

Hey folks. I wrote a little awk script that summarizes /proc/net/dev info and then pipes it to the nix column command to set up column spacing appropriately. Here's some example output: Iface RxMBytes RxPackets RxErrs RxDrop TxMBytes TxPackets TxErrs TxDrop bond0 9 83830... (3 Replies)
Discussion started by: ryran
3 Replies

7. UNIX for Dummies Questions & Answers

Grep and cat combined

Hello, i need to search one word (snp1) from many files and copy the content of the columns of this word in new file. example: file 1: SNP BP CHR P snp1 1 3 0.01 snp2 2 2 0.05 . . file 2: SNP BP CHR P snp1 1 3 0.06 snp2 2 2 0.3 output... (6 Replies)
Discussion started by: biopsy
6 Replies

8. Shell Programming and Scripting

awk combined with an IF

Hi everybody! I try to printout a csv-file with the exeption of cell $1 and $4. what i tried so far: awk '{for(i = 1; i<=NF; i++);if(i == 1 || i == 4);else print($i)}' file.csv ..any ideas how it work and why my example fails? Thanks in advance! IMPe (3 Replies)
Discussion started by: IMPe
3 Replies

9. Shell Programming and Scripting

Combined sed+awk for lookup csv file

have written a combined sed+awk to perform a lookup operation which works but looking to enhance it. looking to match a record using any of the comma separated values + return selected fields from the record - including the field header. so: cat foo make,model,engine,trim,value... (6 Replies)
Discussion started by: jack.bauer
6 Replies

10. Shell Programming and Scripting

Lost redirecting stderr & stdout to 3 files - one each plus combined

Hi folks I need/want to redirect output (stdout, stderr) from an exec call to separate files. One for stderr only and two(!) different (!) ones for the combined output of stderr and stdout. After some research and testing i got this so far : (( exec ${command} ${command_parameters} 3>&1... (6 Replies)
Discussion started by: MDominok
6 Replies
PSIGN(1)						      General Commands Manual							  PSIGN(1)

NAME
psign - produce a RADIANCE picture from text. SYNOPSIS
psign [ options ] [ text ] DESCRIPTION
Psign produces a RADIANCE picture of the given text. The output dimensions are determined by the character height, aspect ratio, number of lines and line length. (Also the character size if text squeezing is used.) If no text is given, the standard input is read. -cb r g b Set the background color to r g b The default is white (1 1 1). -cf r g b Set the foreground color to r g b The default is black (0 0 0). -dr Text reads to the right (default). -du Text reads upwards. -dl Text reads to the left (upside down). -dd Text reads downwards. -h cheight Set the character height to cheight. The default is 32 pixels. -a aspect Set the character aspect ratio (height/width) to aspect. The default value is 1.67. -x xsize Set the horizontal image size to xsize. Use with -y option (below) in place of the -h specification to control output image size directly. If the character aspect ratio (-a option, above) is non-zero, then one of the specified x or y output dimensions may be reduced to maintain this ratio. If direction is right (-dr) or left (-dl), then it is not necessary to give the -y option, since it can be computed from the character height (-h). -y ysize Set the vertical image size to ysize. Use with the -x option (described above). If direction is up (-du) or down (-dd), then it is not necessary to give the -x option, since it can be computed from the character height (-h). -s spacing Set the intercharacter spacing to spacing. The magnitude of this value is multiplied by the character height over the aspect ratio (ie. the character width) to compute the desired distance between characters in the output. The sign of the value, posi- tive or negative, determines how this ideal spacing is used in the actual placement of characters. If spacing is positive, then the overall width of the line will not be affected, nor will indentation of textual elements. Thus, the text format will be mostly unaffected. However, spacing between characters will reflect their relative size for a more natural appearance. If spac- ing is negative, characters will be squeezed together to meet the spacing critereon, regardless of how it might affect the format of the output. The default value for spacing is zero, which is interpreted as uniformly spaced characters. -f fontfile Load the font from fontfile. The default font is helvet.fnt EXAMPLE
To put a big "Hi!" on the terminal: psign -h 22 -a 1 -cb 0 0 0 -cf 1 1 1 Hi! | ttyimage ENVIRONMENT
RAYPATH path to search for font files AUTHOR
Greg Ward BUGS
The entire bitmap is stored in memory, which can be a problem for large and/or high-resolution signs. SEE ALSO
getinfo(1), pcompos(1), pfilt(1), ttyimage(1) RADIANCE
10/9/97 PSIGN(1)
All times are GMT -4. The time now is 01:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy