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
gnomevfs-cat(1) 						   User Commands						   gnomevfs-cat(1)

NAME
gnomevfs-cat - print a file to standard output using the VFS system SYNOPSIS
gnomevfs-cat URI DESCRIPTION
gnomevfs-cat is obsolete. It has been superseded by gvfs-cat. See gvfs-cat(1). gnomevfs-cat prints a file to standard output using the virtual file system to access the file via a URI. OPERANDS
The following operands are supported: URI Specifies the file location in standard URI format. EXAMPLES
Example 1: Cat a File From a Web Server example% gnomevfs-cat http://www.sun.com Example 2: Cat a Local File example% gnomevfs-cat file:///home/user/README.txt ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables: NLSPATH. EXIT STATUS
The exit value 0 is returned regardless of success or failure. FILES
The following files are used by this application: /usr/bin/gnomevfs-cat Executable to print a file to standard output using the VFS system ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWgnome-vfs | +-----------------------------+-----------------------------+ |Interface stability |Obsolete Volatile | +-----------------------------+-----------------------------+ SEE ALSO
gnomevfs-copy(1), gnomevfs-info(1), gnomevfs-ls(1), gnomevfs-mkdir(1), gvfs-cat(1), attributes(5), environ(5) NOTES
Written by Stephen Browne, Sun Microsystems Inc., 2004. SunOS 5.11 14 May 2008 gnomevfs-cat(1)
All times are GMT -4. The time now is 07:32 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy