05-19-2008
Thank you for the code
. it works however I did not think of the case where the system could go down and I could have 6 or x files to read.
Hence, how would I get the files that are yesterday's only even if they are mixed up with older-than-yesterday files?
Thank you
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I have written a script to rename a file, but I can not add the current date (in YYYYMMDD-HHMM format)
can you please look at this cript, and help?
thanks,
#!/usr/local/bin/tcsh -f
set server = "$1"
set user = "$2"
if (-f $server) then
\mv $server $server.Saar.
endif (4 Replies)
Discussion started by: sierra_aar
4 Replies
2. Shell Programming and Scripting
I'm looking to edit a file which contains various data including date.(ddmmyyyy)
I want to sort by date and then count the number of different dates found
Any ideas how to acheive this
Thanks in advance. (2 Replies)
Discussion started by: Mudshark
2 Replies
3. Solaris
I have the following requirement.
1. I have to concatenate the 10 fixed width files.
2. sort based on first 10 characters
3. after that i have remove first 10 chacters from the file.
can you please tell me how to do it.
Thanks in Advance
Samba (1 Reply)
Discussion started by: samba
1 Replies
4. Shell Programming and Scripting
I am a beginner in script writing, i tried to do the following
I have a set of files sorted by date in the format YYMMDD.s and .x and .r
I need to concatenate a header file to these sets of files so I used the following code
echo "enter Swath number"
read s
echo "please enter first date and... (2 Replies)
Discussion started by: docaia
2 Replies
5. Shell Programming and Scripting
Hello World~
Please Help Me(BASH)
input:
dde,2007.8.25,891
dde,2007.8.23,356
dfe,2007.10.12,341
cba,2005.12.5,342
I wanna know how to sort by the date(2005.12.5)
output:
cba,2005.12.5,342
dde,2007.8.23,356
dde,2007.8.25,891
dfe,2007.10.12,341
Thanks in advance (3 Replies)
Discussion started by: lifegeek
3 Replies
6. Shell Programming and Scripting
Hi All,
Please help me to sort the date field which is in the format 2012-02-03 16:09:37.388...
Platform: Red Hat linux
Thanks in advance (2 Replies)
Discussion started by: jesu
2 Replies
7. Shell Programming and Scripting
Gents,
I have lot of files in a folder where each file name includes the date of generation, then I would like to merge
all the files for each date in a complete file.
list of files in forder.
dsd01_121104.txt
dsd01_121105.txt
dsd01_121106.txt
dsd03_121104.txt
dsd03_121105.txt... (7 Replies)
Discussion started by: jiam912
7 Replies
8. Shell Programming and Scripting
Hi Experts,
I have a filelist collected from another server , now want to sort the output using date/time stamp filed.
- Filed 6, 7,8 are showing the date/time/stamp.
Here is the input:
#----------------------------------------------------------------------
-rw------- 1 root ... (3 Replies)
Discussion started by: rveri
3 Replies
9. Shell Programming and Scripting
nawk '$1=="Date" {d=$(NF-2);next} $1=="Queue" {q=$NF;next} $1=="Forms"{print q, $NF, d}' OFS='|' printfile.log
I have this script working. Please let me know how to sort by Queue and then Date. (4 Replies)
Discussion started by: Daniel Gate
4 Replies
10. Shell Programming and Scripting
Following is the input. 1st and 3rd block are same(block starts here with '*' and ends before blank line) , 2nd and 4th blocks are also the same:
cat <file>
* Wed Feb 24 2016 Tariq Saeed <tariq.x.saeed@mail.com> 2.0.7-1.0.7
- add vmcore dump support for ocfs2
* Mon Jun 8 2015 Brian Maly... (4 Replies)
Discussion started by: Paras Pandey
4 Replies
merge(1) merge(1)
NAME
merge - three-way file merge
SYNOPSIS
merge [-Llabel1 [-Llabel3]] [-p] [-q] file1 file2 file3
DESCRIPTION
merge incorporates all changes that lead from file2 to file3 into file1. The result goes to standard output if -p is present, into file1
otherwise. merge is useful for combining separate changes to an original. Suppose file2 is the original, and both file1 and file3 are
modifications of file2. Then merge combines both changes.
An overlap occurs if both file1 and file3 have changes in a common segment of lines. On a few older hosts where diff3 does not support the
-E option, merge does not detect overlaps, and merely supplies the changed lines from file3. On most hosts, if overlaps occur, merge out-
puts a message (unless the -q option is given), and includes both alternatives in the result. The alternatives are delimited as follows:
<<<<<<< file1 lines in file1 ======= lines in file3 >>>>>>> file3
If there are overlaps, the user should edit the result and delete one of the alternatives. If the -L label1 and -L label3 options are
given, the labels are output in place of the names file1 and file3 in overlap reports.
DIAGNOSTICS
Exit status is 0 for no overlaps, 1 for some overlaps, 2 for trouble.
IDENTIFICATION
Author: Walter F. Tichy.
Revision Number: 1.1.6.2; Release Date: 1993/10/07.
Copyright (C) 1982, 1988, 1989 by Walter F. Tichy.
Copyright (C) 1990, 1991 by Paul Eggert.
SEE ALSO
diff3(1), diff(1), rcsmerge(1), co(1)
merge(1)