Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Append file with grep output but add timestamp? Post 302328881 by Sepia on Thursday 25th of June 2009 11:08:56 AM
Old 06-25-2009
Quote:
Originally Posted by vgersh99
cannot do that unless the 'other server' directory is NFS mounted.
Thats a shame.

Thanks for your help.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Append output to file

Hi, I have a script below. It get's the data from the output of a script that is running hourly. My problem is every time my script runs, it deletes the previous data and put the current data. Please see output below. What I would like to do is to have the hourly output to be appended on the... (3 Replies)
Discussion started by: ayhanne
3 Replies

2. Shell Programming and Scripting

Append Output to another file in Perl

Hi All, I am writing a Perl script such that the output from "perl myscript.pl file1" to be appended to another file name called file2. I tried out with the below code but couldn't work. Can any expert give me some advice? open(OUTPUT, 'perl myscript.pl file1 |'); close OUTPUT;... (7 Replies)
Discussion started by: Raynon
7 Replies

3. AIX

how to grep and compare timestamp in a file with the current date

I want to read a log file from a particular location.In the logfile , lines contains timestamp.I need to compare the timestamp in the logfile with the current date.If the timpestamp in the log file is less than 4 hours then i need to read the file from that location.Below is the file format.Please... (1 Reply)
Discussion started by: achu
1 Replies

4. AIX

how to grep and compare timestamp in a file with the current date

I want to read a log file from a particular location.In the log file each line starts with timestamp.I need to compare the timestamp in the logfile with the current date.If the timpestamp in the log file is less than 4 hours then i need to read the file from that location.Below is the file... (1 Reply)
Discussion started by: achu
1 Replies

5. UNIX for Dummies Questions & Answers

Output to file but append rather than overwrite?

I am running a command which has a parameter that outputs the results to a file each time it is run. Here is the command: --fullresult=true > importlog.xml Can I add the output to the file rather than creating a new one which overwrites the existing one? If not can I make the file name... (2 Replies)
Discussion started by: Sepia
2 Replies

6. Shell Programming and Scripting

append an output file with two columns

Hi All, can you help me with this: grep XXX dir/*.txt|wc -l > newfile.txt - this put the results in the newfile.txt, but I want to add another column in the newfile.txt, string 'YYYYY', separated somehow, which corresponds on the grep results? For example grep will grep XXX dir/*.txt|wc -l >... (5 Replies)
Discussion started by: apenkov
5 Replies

7. Shell Programming and Scripting

How to append timestamp in the filenames using find?

Hi, How to change the filenames with timestamp in sub folders I have the following code to select the records. find . -type f -name '*pqr*' -ctime 1 -print The following is the example app_root_dir="/`echo $ScriptDir | cut -d'/' -f2`" $app_root_dir/../BadFiles directory uvw.bad... (3 Replies)
Discussion started by: bobbygsk
3 Replies

8. Shell Programming and Scripting

Append timestamp create .trg file for all content of an unzipped archive

Hi, I have a test.zip archive that contains test.zip --> (file_1.txt, file_2.txt , file_3.txt) I need to unzip the file like this, file_1_timestamp.txt file_1_timestamp.trg file_2_timestamp.txt file_2_timestamp.trg file_3_timestamp.txt file_3_timestamp.trg Could you please let me know... (7 Replies)
Discussion started by: Shandel
7 Replies

9. Shell Programming and Scripting

Append to a file repeating output

Hello, i'm trying to force a command to read every second from an interface watch -n1 (command) /dev/x | cat >> output but it continue to overwrite the file, without append the content Thanks and advace for help as usual regards (4 Replies)
Discussion started by: Board27
4 Replies

10. Shell Programming and Scripting

Grep lines between last hour timestamp and current timestamp

So basically I have a log file and each line in this log file starts with a timestamp: MON DD HH:MM:SS SEP 15 07:30:01 I need to grep all the lines between last hour timestamp and current timestamp. Then these lines will be moved to a tmp file from which I will grep for particular strings. ... (1 Reply)
Discussion started by: nms
1 Replies
showmount(8)						      System Manager's Manual						      showmount(8)

NAME
showmount - Shows remote NFS compatible mounts on a host SYNOPSIS
showmount [-adeT] [-t nnn] [host] FLAGS
Lists all mount points in the form: hostname:dirpath. In this form, hostname is the name of a client that has remotely mounted a directory from an NFS server, and dirpath is the directory that has been mounted. Lists only directories that have been remotely mounted by clients. Shows host's exports list. Specifies an infinite timeout. The default timeout value is 25 seconds. Specifies a timeout value, in sec- onds. The default timeout value is 25 seconds. The default value for host is the current hostname. DESCRIPTION
The showmount command shows status information about the NFS server on host. By default, it prints the names of all hosts that have NFS file systems mounted from the server host. See NFS: Network File System Protocol Specification, RFC1094, Appendix A for a detailed description of the protocol. NOTES
The mountd daemon running on the server only has an idea of the actual mounts, since the NFS server is stateless. showmount will only dis- play the information as accurately as the mount daemon reports it. The default timeout value of 25 seconds can be too brief to read and verify an export list. If you receive timeout messages when using the showmount -e command, use either the -T or the -t options to increase the timeout value. FILES
Specifies the command path Contains a table of local file systems mounted by remote NFS clients RELATED INFORMATION
Commands: mount(8) Daemons: mountd(8) Files: mountdtab(4) delim off showmount(8)
All times are GMT -4. The time now is 10:09 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy