hi,
i searched the forum, but found no thread relate to this; so sorry if it's duplicated.
I'm using unix cat command but it gives no output. I check permission, owner and group; all of which are OK. I could do less and vi.
any suggestions?
thanks, (2 Replies)
Hello,
I'm new to shell scripting and did a search on the forum to what I want to do but couldn't find anything.
I have about 9 routers that outputs to 1 syslog file daily named cisco.year.mo.date.log ex: cisco.2009.05.11.log
My goal is to make a parsing script that cats today's syslog... (2 Replies)
Hi,
I need to concatenate data files with a .mp extension that are stored in directories by year. I want to keep the same filename as an output for example:
for the file name p030.mp, which resides in the following subdirectories:
/2000/p030.mp
/2001/p030.mp
/2002/p030.mp
I want to:... (4 Replies)
Hi
I'm executing a menu script in which I `cat a file` but it's giving different output some times. Following is the code fragment taken from my script.
while true
do
cat procs.configured
echo ---------separator--------------
sleep 3
done
when I execute this code fragment, `cat` outputs... (2 Replies)
I want to recursively cat the content of files in a directory e.g.
find /etc -type f -exec cat {} \;
But I want it to print the file name first and then the content. For example let's say /etc/statetab and /etc/colord.conf will be printed first then I want the output to look something like;
... (6 Replies)
Hi All,
I have an input file containing data as below:
Input.DAT
XXXXXXX|YYYYYYY|ZZZZZZZZZZ|12334446456|B|YY|111111111|111111111|111111111|111111111|15|3|NNNNNN|Y|3|AAA|111111111... (11 Replies)
I have a file
# cat /root/llll
11
22
33
44
When I cat this file content to a variable inside a shell script and echo that shell script, it does not show up as separate lines. I need echo output similar to cat.
cat /root/shell_script.sh
#!/bin/bash
var=`cat /root/llll`
echo $var (2 Replies)
I have a directory that is restricted and I cannot just copy the files need, but I can cat them and redirect them to a new directory. The files all have the date listed in them. If I perform a long listing and grep for the date (150620) I can redirect that output to a text file. Now I need to... (5 Replies)
This should recursively walk through all dirictories and
search for a specified string in all present files, if found
output manicured content (eg some regex) with CAT into
a specified directory (eg /tmp/)
one by one, keeping the original names
This is what I have so far, which seems to... (1 Reply)
Discussion started by: lowmaster
1 Replies
LEARN ABOUT DEBIAN
plan9-read
CAT(1) General Commands Manual CAT(1)NAME
cat, read, nobs - catenate files
SYNOPSIS
cat [ file ... ]
read [ -m ] [ -n nline ] [ file ... ]
nobs [ file ... ]
DESCRIPTION
Cat reads each file in sequence and writes it on the standard output. Thus
cat file
prints a file and
cat file1 file2 >file3
concatenates the first two files and places the result on the third.
If no file is given, cat reads from the standard input. Output is buffered in blocks matching the input.
Read copies to standard output exactly one line from the named file, default standard input. It is useful in interactive rc(1) scripts.
The -m flag causes it to continue reading and writing multiple lines until end of file; -n causes it to read no more than nline lines.
Read always executes a single write for each line of input, which can be helpful when preparing input to programs that expect line-at-a-
time data. It never reads any more data from the input than it prints to the output.
Nobs copies the named files to standard output except that it removes all backspace characters and the characters that precede them. It is
useful to use as $PAGER with the Unix version of man(1) when run inside a win (see acme(1)) window.
SOURCE
/src/cmd/cat.c
/src/cmd/read.c
/bin/nobs
SEE ALSO cp(1)DIAGNOSTICS
Read exits with status eof on end of file or, in the -n case, if it doesn't read nlines lines.
BUGS
Beware of and which destroy input files before reading them.
CAT(1)