Sponsored Content
Full Discussion: Date included
Top Forums UNIX for Beginners Questions & Answers Date included Post 302990472 by bcarosi on Thursday 26th of January 2017 04:59:54 PM
Old 01-26-2017
Date included

Code:
#!/usr/bin/ksh

# This script reads the *.rpt files created by xenos during job execution.
# The job name, jobid, number of pages processed and pdf files created for each job
# are added to the xenoshistory.txt file


[for file in $(find /d2e/logs/*.rpt -mtime -2 | grep -v ftplog)
 do
   awk '$3 == "Application" {QName = $6}
        $2 == "XifPages" {pages = $6}
        $2 == "XifEndOfDocuments" {files = $6}
        index($0,"CompletionCode") && index($1,"Info"){sevGTI = 1}
           END {if (sevGTI)
                printf "%10s%10s%7s%s",QName,pages,files,ORS
             }
       ' $file>>/home/p611568/new.txt
       chmod 775 /home/p611568/new.txt
echo $'   QName\tPages\tFiles'  | cat - new.txt > count.txt

done]

Currently the ouput file looks like this but I need a date where the xxxx is
Code:
$ cat new.txt
XXXXX
      QName       Pages   Files
      efvahi1       102     85
      efvahi1       102     85


Last edited by RudiC; 01-27-2017 at 04:29 AM..
 

6 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

PS1 with date stamp included in prompt

How would I put the date within my PS1 command for my shell prompt? I have it set to: PS1='$>' I tried PS1='$>' but that didn't work. (7 Replies)
Discussion started by: kymberm
7 Replies

2. UNIX for Dummies Questions & Answers

Addition with the prefixing zeros included

Hi I need to do an add function but it should include the prefixed zeros For Example i=00123 j=`expr $i + 1` The output it shows is 124 but I want the output to be 00124 Could any one help me finding out how to do this Thanks (16 Replies)
Discussion started by: sivasenthil_k
16 Replies

3. Solaris

What update level included fcinfo?

Hi all first post here. quick question what Solaris 10 update level included this utility? I have a bunch of Sun boxes at varying levels of Solaris 10 some have it some do not. When I do my install I take the full option for the packages to install on all the systems. thanks in advance... Mike (4 Replies)
Discussion started by: mike_243us
4 Replies

4. Programming

Compile error from included headers

Hello, I have an error when I include the socket.h linux header and compile with gcc. In file included from /usr/include/sys/socket.h:40:0, from test.c:17: /usr/include/bits/socket.h:217:5: error: expected identifier before numeric constant In test.c:17: #include... (4 Replies)
Discussion started by: meltingshell
4 Replies

5. UNIX for Dummies Questions & Answers

Create a condition for a non-included string

hey, just want to ask how to check this scenario a="apple banana cherry" if egg=0 fi how do you do the condition? thanks! (2 Replies)
Discussion started by: h0ujun
2 Replies

6. Shell Programming and Scripting

Rm -rf file.txt~ included in the first step?

I need to shred and delete a file after a certain time. Therefore I use shred -z /path/to/file.txt | rm -rf /path/to/file.txtIt works well, but typing in that very directory ls -shiI still see the so called backup-copy lets say file.txt~ When running bleachbit it will disappear thoroughly.... (3 Replies)
Discussion started by: 1in10
3 Replies
RDUP-UP(1)							       rdup								RDUP-UP(1)

NAME
rdup-up - update a directory tree with a rdup archive SYNOPSIS
rdup-up [OPTION]... DIRECTORY DESCRIPTION
With rdup-up you can update an (possibly) existing directory structure with a rdup archive. The rdup archive has to be given to rdup-up's standard input. Username and uids rdup outputs both the username and uid, the receiving system (which may be a totally different system) checks if the username and uid match. If the username and uid don't match the (numeric) uid is used on the file. The same holds true for the groupname and gid. OPTIONS
-n Do a dry-run and do not create anything on disk. -t Create DIRECTORY (ala mkdir -p) if it does not exist. -s N Strip N path components from a pathname. If the resulting pathname is empty after this operation it is skipped. Be careful however with the following structure: /foo /foo/bar /foo/bar/bla.txt /foo/blork/bla.txt With rdup-up -s2 this will leave: <empty> <empty> /bla.txt /bla.txt And the last 'bla.txt' will overwrite the previous one, this will happen without warnings. -r PATH This option is related to the -s option, but works different. The string PATH is removed from (the beginning of) each pathname. With -r /home/backup the pathname /home/backup/bin/mycmd becomes /bin/mycmd. The same could be done with -s 2, but then you need to count the slashes. Note -s is always performed before -r. -v Be more verbose and echo the processed files to standard output. -vv Be even more verbose and echo processed file and the uid and gid information to standard output. -T Show a table of contents of the rdup stream received (ala tar -tf -). With -T the directory argument is optional. -T unsets any verbose (-v) options. -h A short help message. -V Show the version. EXIT CODE
rdup-up return a zero exit code on success, otherwise 1 is returned. AUTHOR
Written by Miek Gieben. REPORTING BUGS
Report bugs to <miek@miek.nl>. SEE ALSO
http:/www.miek.nl/projects/rdup/ is the main site of rdup. Also see rdup(1), rdup-tr(1) and rdup-backups(7). COPYRIGHT
Copyright (C) 2005-2010 Miek Gieben. This is free software. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Licensed under the GPL version 3. See the file LICENSE in the source distribution of rdup. 1.1.11 13 Dec 2008 RDUP-UP(1)
All times are GMT -4. The time now is 09:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy