"gzcat help"

Post #302648035 by vanand420 on Tuesday 29th of May 2012 08:54:43 AM

Full Discussion: gzcat help
Originally Posted by vbe
The errors come from the syntax usage which wants the command followed by options if any then [name... ]
so looking at your command line you get:
gzcat (the command)  [ no options] [name1:/logs/1205[01]*] [name2: gzcat] [name3:/logs/12052[0123]*] [name4:cat] [name5:/logs/12052[456789] ]

You see here that name2 and name4 are the two first "errors"
name5 the list of non gzip format files that you knew werent for you used cat to list if it did work that way...
But it doesnt..., look at the man pages!
Thanks..any feasible option to execute cat also, as i have both type of files in the directory and processing them seperately will add to double efforts.
Test Your Knowledge in Computers #103
Difficulty: Easy
In 2019, Linux was the most popular Unix variant on the market.
True or False?

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

gzcat (or gunzip -c)

Does anyone know what kind of impact gunzip -c or gzcat has on a system? I am using gunzip -c on files that around 30 Mb compressed and 300Mb uncompressed. How much memory or disk space gets used? Also does anyone know how gunzip -c actually works? The system I am running on is AIX Version 5. ... (1 Reply)
Discussion started by: windjunky
1 Replies

2. Shell Programming and Scripting

gzcat into awk and then change FILENAME and process new FILENAME

I am trying to write a script that prompts users for date and time, then process the gzip file into awk. During the ksh part of the script another file is created and needs to be processed with a different set of pattern matches then I need to combine the two in the end. I'm stuck at the part... (6 Replies)
Discussion started by: timj123
6 Replies

3. Shell Programming and Scripting

performance issue using gzcat, awk and sort

hi all, I was able to do a script to gather a few files and sort them. here it is: #!/usr/bin/ksh ls *mainFile* |cut -c20-21 | sort > temp set -A line_array i=0 file_name='temp' while read file_line do line_array=${file_line} let i=${i}+1 (5 Replies)
Discussion started by: naoseionome
5 Replies

4. Shell Programming and Scripting


Hi!!! I am trying to grep a number in more then 1000 files which are .gz. Below is the code :- for i in `ls 20090618yz*_07.znf.gz` do a=`gzcat 20090618yz*_07.znf.gz | grep 9814843011` if then echo $i fi done My objective is to echo the file name also with the data. ... (3 Replies)
Discussion started by: tushar_tus
3 Replies

5. UNIX for Dummies Questions & Answers

How to list file names instead of lines when grep a gzcat command?

Hi, I want to list filenames instead of lines when i search in compresed files for a string. #gzcat *.gz | grep -l 12345 gives me: <stdin> Anyone got a solution on this problem? (2 Replies)
Discussion started by: HugoH
2 Replies

6. Shell Programming and Scripting

[Solved] Read a .gz file line by line without using gzcat

Hi all Is there a way to read and process a gzip file line by line similar to a text file without using gzcat.. while processing a text file we will usually use the logic exec<sample.txt while read line do echo $line done Is there a similar way to process the gz file in the same... (4 Replies)
Discussion started by: aikhaman
4 Replies

7. Shell Programming and Scripting

gzcat number of records

Hey guys, I want to do something quite simple but I just can't no matter what I try. I have a large file and i usually just: gzcat test.gz | nohup /test/this-script-does-things-to-the-records.pl -> /testdir/tmp_test.txt But now I need to do it only for the first 100k records. I sure... (7 Replies)
Discussion started by: sg3
7 Replies
MOUNT_PORTAL(8) 					    BSD System Manager's Manual 					   MOUNT_PORTAL(8)

mount_portal -- mount the portal daemon SYNOPSIS
mount_portal [-o options] /etc/portal.conf mount_point DESCRIPTION
The mount_portal command attaches an instance of the portal daemon to the global filesystem namespace. The conventional mount point is /p. The directory specified by mount_point is converted to an absolute path before use. This command is normally executed by mount(8) at boot time. The options are as follows: -o Options are specified with a -o flag followed by a comma separated string of options. See the mount(8) man page for possible options and their meanings. The portal daemon provides an open service. Objects opened under the portal mount point are dynamically created by the portal daemon accord- ing to rules specified in the named configuration file. Using this mechanism allows descriptors such as sockets to be made available in the filesystem namespace. The portal daemon works by being passed the full pathname of the object being opened. The daemon creates an appropriate descriptor according to the rules in the configuration file, and then passes the descriptor back to the calling process as the result of the open system call. NAMESPACE
By convention, the portal daemon divides the namespace into sub-namespaces, each of which handles objects of a particular type. Currently, four sub-namespaces are implemented: tcp, fs, rfilter and wfilter. The tcp namespace takes a hostname and a port (slash sepa- rated) and creates an open TCP/IP connection. The fs namespace opens the named file, starting back at the root directory. This can be used to provide a controlled escape path from a chrooted environment. The rfilter and wfilter namespaces open a pipe to a process, typically a data-filter such as compression or decompression programs. The rfilter namespace opens a read-only pipe, while the wfilter namespace opens a write-only pipe. See the EXAMPLES section below for more exam- ples. CONFIGURATION FILE
The configuration file contains a list of rules. Each rule takes one line and consists of two or more whitespace separated fields. A hash (``#'') character causes the remainder of a line to be ignored. Blank lines are ignored. The first field is a pathname prefix to match against the requested pathname. If a match is found, the second field tells the daemon what type of object to create. Subsequent fields are passed to the creation function. The rfilter and wfilter namespaces have additional meanings for the remaining fields. The third field specifies a prefix that is to be stripped off of the passed name before passing it on to the pipe program. If the prefix does not match, no stripping is performed. The fourth argument specifies the program to use for the pipe. Any remaining fields are passed to the pipe program. If the string ``%s'' exists within these remaining fields, it will be replaced by the path after stripping is performed. If there is no field after the program name, ``%s'' will be assumed, to maintain similarity with the tcp and fs namespaces. FILES
A tutorial and several examples are provided in /usr/share/examples/mount_portal. The following is an example configuration file. # @(#)portal.conf 5.1 (Berkeley) 7/13/92 tcp/ tcp tcp/ fs/ file fs/ echo/ rfilter echo/ echo %s echo_nostrip/ rfilter nostrip echo %s echo_noslash rfilter echo_noslash echo %s gzcat/ rfilter gzcat/ gzcat %s gzip/ wfilter gzip/ gzip > %s gzip9/ wfilter gzip9/ gzip -9 > %s ftp/ rfilter ftp/ ftp -Vo - %s ftp:// rfilter nostrip ftp -Vo - %s http:// rfilter nostrip ftp -Vo - %s bzcat/ rfilter bzcat/ bzcat %s nroff/ rfilter nroff/ nroff -man %s As is true with many other filesystems, a weird sense of humor is handy. Notice that after the keynames, like nroff/ and bzcat/, we typically use another slash. In reality, the mount_portal process changes direc- tory to /, which makes the subsequent slash unnecessary. However, the extra slash provides a visual hint that we are not operating on an ordinary file. An alternative would be to change the configuration file to something like: nroff% rfilter nroff% nroff -man One might then use less /p/nroff%/usr/share/man/man8/mount_portal.8 SEE ALSO
mount(2), unmount(2), fstab(5), mount(8) HISTORY
The mount_portal utility first appeared in 4.4BSD. The rfilter and wfilter capabilities first appeared in NetBSD 1.5. The portal kernel driver was removed and mount_portal was converted to use puffs(3) in NetBSD 6.0. BUGS
This filesystem may not be NFS-exported. BSD
December 5, 2009 BSD

Featured Tech Videos

All times are GMT -4. The time now is 03:45 AM.
Unix & Linux Forums Content Copyright 1993-2019. All Rights Reserved.
Privacy Policy