Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Printing a file within a cat call Post 302817273 by elixir_sinari on Wednesday 5th of June 2013 01:38:32 PM
Old 06-05-2013
Quote:
Originally Posted by shamrock
Code:
geo=$(cat geom.txt)

Why use cat at all? Use the shell itself geo=$(<geom.txt).
These 2 Users Gave Thanks to elixir_sinari For This Post:
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

cat and lp or pr printing of file

Can you use cat to send the first 25 lines of a file to the printer? I'm thinking I can pipe it with '|' but I'm not school to check printer output. With the 'nl' used, all lines are numbered on the print out, but how does one number only the blank lines? Thanks:) (1 Reply)
Discussion started by: bitwize
1 Replies

2. UNIX for Dummies Questions & Answers

Easiest way to cat out first 100 lines of a file into a different file?

Not sure how to do this exactly.. just want to take the first 100 lines of a file and cat it out into a second file. I know I can do a more on a file and > it into a different file, but how can I make it so only the first 100 lines get moved over? (1 Reply)
Discussion started by: LordJezo
1 Replies

3. UNIX for Dummies Questions & Answers

How to cat file

I want to cat a file with only show the line contain '/bin/bash' but don't show the line contain 'load' (don't show if the line contain 'load' and '/bin/bash' together), how to type in the command? thk a lot! (2 Replies)
Discussion started by: zp523444
2 Replies

4. UNIX for Dummies Questions & Answers

Difference between cat , cat > , cat >> and touch !!!

Hi Can anybody tell the difference between Difference between cat , cat > , cat >> and touch command in UNIX? Thanks (6 Replies)
Discussion started by: skyineyes
6 Replies

5. Shell Programming and Scripting

cat in the command line doesn't match cat in the script

Hello, So I sorted my file as I was supposed to: sort -n -r -k 2 -k 1 file1 | uniq > file2 and when I wrote > cat file2 in the command line, I got what I was expecting, but in the script itself ... sort -n -r -k 2 -k 1 averages | uniq > temp cat file2 It wrote a whole... (21 Replies)
Discussion started by: shira
21 Replies

6. Shell Programming and Scripting

Cat file

how to cat a file by ignoring first line and last line (1 Reply)
Discussion started by: thelakbe
1 Replies

7. UNIX for Advanced & Expert Users

for i in `cat file` do

in bash: for i in `cat file` ; do echo $i done; how will i do this in perl ? (10 Replies)
Discussion started by: linuxgeek
10 Replies

8. Shell Programming and Scripting

Cat Command on File not printing "Blank" Lines?

Hello All, I have a bash script and in it at some point I call an Expect Script that does some stuff and saves its output in a ".txt" file. Example "/path/to/my/file/Expect_Output.txt" file: notice the 2nd line is empty in the file... Data for Host-1 (192.168.1.110) Checking the... (2 Replies)
Discussion started by: mrm5102
2 Replies

9. Shell Programming and Scripting

Ssh cat file output into a file on local computer

Hello, I'm on a remote computer by SSH. How can I get the output of "cat file" into a file on the local computer? I cannot use scp, because it's blocked. something like: ssh root@remote_maschine "cat /file" > /locale_machine/file :rolleyes: (2 Replies)
Discussion started by: borsti007
2 Replies
geo(1rheolef)                                                       rheolef-6.1                                                      geo(1rheolef)

NAME
geo - plot a finite element mesh SYNOPSIS
geo options mesh[.geo[.gz]] DESCRIPTION
Plot or upgrade a finite element mesh. EXAMPLES
Plot a mesh: geo square.geo geo box.geo geo box.geo -full Plot a mesh into a file: geo square.geo -image-format png Convert from a old geo file format to the new one: geo -upgrade - < square-old.geo > square.geo See below for the geo file format scpecification. The old file format does not contains edges and faces connectivity in 3d geometries, or edges connectivity in 2d geometries. The converter add it automatically into the upgraded file format. Conversely, the old file format is usefull when combined with a translator from another file format that do not provides edges and faces connectivity. INPUT FILE SPECIFICATION
filename specifies the name of the file containing the input mesh. The ".geo" suffix extension is assumed. - read mesh on standard input instead on a file. -name when mesh comes from standard input, the mesh name is not known and is set to "output" by default. This option allows to change this default. Useful when dealing with output formats (graphic, format conversion) that creates auxilliary files, based on this name. -Idir -I dir Add dir to the rheolef file search path. This mechanism initializes a search path given by the environment variable `RHEOPATH'. If the environment variable `RHEOPATH' is not set, the default value is the current directory. -check Check that element orientation is positive. INPUT FORMAT OPTIONS
-if format -input-format format load mesh in format file format, instead of plotting it. Supported output formats are: geo, bamg, vtk. When loading from a file, the corresponding suffix extension is assumed. RENDER SPECIFICATION
-gnuplot use gnuplot tool. This is the default. -mayavi use mayavi tool. RENDER OPTIONS
-lattice -nolattice When using a high order geometry, the lattice inside any element appears. Default is on; -subdivide int When using a high order geometry, the number of points per edge used to draw a curved element. Default value is the mesh order. -full -nofull All internal edges appears, for 3d meshes. Default is off; -fill -nofill Fill mesh faces using light effects, when available. -stereo -[no]stereo Rendering mode suitable for red-blue anaglyph 3D stereoscopic glasses. Option only available with mayavi. -cut -nocut cut by plane and clip (with mayavi only). OUTPUT FILE FORMAT OPTIONS
-geo output mesh on standard output stream in geo text file format, instead of plotting it. -upgrade Convert from a old geo file format to the new one. -gmsh output mesh on standard output stream in gmsh text file format, instead of plotting it. -image-format string The argument is any valid image format, such as bitmap png, jpg, gif or vectorial ps or pdf image file formats, and that could be handled by the corresponding render. The output file is e.g. `@emph{basename'.png} when @emph{basename} is the name of the mesh, or can be set with the -name option. OTHERS OPTIONS
-add-boundary check for a domain named "boundary"; If this domain does not exists, extract the boundary of the geometry and append it to the domain list. This command is usefull for mesh converted from generators, as bamg, that cannot have more than one domain specifica- tion per boundary edge. -verbose print messages related to graphic files created and command system calls (this is the default). -noverbose does not print previous messages. -clean clear temporary graphic files (this is the default). -noclean does not clear temporary graphic files. -execute execute graphic command (this is the default). -noexecute does not execute graphic command. Generates only graphic files. This is usefull in conjuction with the "-noclean" command. -check -dump used for debug purpose. INQUIRE OPTIONS
-min-element-measure -max-element-measure print the smallest (resp. largest) element measure and then exit. GEO FILE FORMAT
TODO rheolef-6.1 rheolef-6.1 geo(1rheolef)
All times are GMT -4. The time now is 05:52 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy