Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Printing a file within a cat call Post 302817241 by jaldo0805 on Wednesday 5th of June 2013 01:03:23 PM
Old 06-05-2013
Thanks for your reply, but probably I didn't express my question adequately... with the example using $key, I meant that if its only a variable previously defined what I want to print within the cat call, there is no problem, but if its the content of a file like geom.txt what I want to print within, it doesn't work the same way, that is by using $geom.txt it does not print the content of geom.txt... so in the "code example" I provided, in the line just after $key, what I really want is the actual content of geom.txt (which is a file that already exists in my working directory).
Thanks again,
 

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
GEOM(8) 						    BSD System Manager's Manual 						   GEOM(8)

NAME
geom -- universal control utility for GEOM classes SYNOPSIS
geom class help geom class list [-a] [name ...] geom class status [-ags] [name ...] geom class load [-v] geom class unload [-v] DESCRIPTION
The geom utility is used to control various GEOM classes. A class has to be aware of geom(8) communication methods, but there are also some standard commands which can be used for existing geom(8) unaware classes. Here is the list of standard commands: help List all available commands for the given class. list Print detailed information (within the given class) about all geoms (if no additional arguments were specified) or the given geoms. This command is only available if the given class exists in the kernel. Additional options include: -a Print information for geoms without providers. status Print general information (within the given class) about all geoms (if no additional arguments were specified) or the given geoms. This command is only available if the given class exists in the kernel. Additional options include: -a When used with -g, print status for geoms without providers. -g Report statuses for geoms instead of providers. -s Produce script-friendly output. load Load the kernel module that implements the given class. This command is only available if the class does not yet exist in the kernel and the file geom_<class>.ko can be found in one of the directories specified in kern.module_path sysctl. unload Unload the kernel module which implements the given class. This command is only available if the given class is loaded as a kernel module. Class-specific commands are implemented as shared libraries which are stored in /lib/geom/ directory and are loaded via dlopen(3) function when the class name is known. When a class-specific shared library exists, a direct utility should also be available under the name of gclass. Currently available classes which are aware of geom(8): o CACHE o CONCAT o ELI o JOURNAL o LABEL o MIRROR o MOUNTVER o MULTIPATH o NOP o PART o RAID o RAID3 o SCHED o SHSEC o STRIPE o VIRSTOR ENVIRONMENT
The following environment variables affect the execution of geom: GEOM_LIBRARY_PATH Specifies the path where shared libraries are stored instead of /lib/geom/. Multiple paths can be specified with a colon- separated list of paths. EXIT STATUS
Exit status is 0 on success, and 1 if the command fails. EXAMPLES
The following example shows how to set up a stripe on three disks for automatic configuration: geom stripe label -v -s 65536 data /dev/da0 /dev/da1 /dev/da2 or: gstripe label -v -s 65536 data /dev/da0 /dev/da1 /dev/da2 Print the list of all providers from the DISK class: geom disk list Unload a kernel module which implements the MD class: geom md unload SEE ALSO
libgeom(3), geom(4), gcache(8), gconcat(8), geli(8), gjournal(8), glabel(8), gmirror(8), gmountver(8), gmultipath(8), gnop(8), gpart(8), graid3(8), gsched(8), gshsec(8), gstripe(8), gvirstor(8) HISTORY
The geom utility appeared in FreeBSD 5.3. AUTHORS
Pawel Jakub Dawidek <pjd@FreeBSD.org> BSD
January 5, 2011 BSD
All times are GMT -4. The time now is 01:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy