Hi all
I currently use the following in shell.
#!/bin/sh
while read LINE
do
perl -i -ne "$/ = ''; print if !m'Using archive: ${LINE}'ms;" "datafile"
done < "listfile"
NOTE the single quote delimiters in the expression. It's highly likely the 'LINE' may very well have characters in it... (3 Replies)
I have a control file which looks like this
LOAD DATA
INFILE '/array/data/data_Finished_T5_col_change/home/oracle/emp.dat'
PRESERVE BLANKS
INTO TABLE SCOTT.EMP
FIELDS TERMINATED BY '|' OPTIONALLY ENCLOSED BY '"' TRAILING NULLCOLS
(.................
..................)
How can i edit the... (1 Reply)
I know how to check if any file has a unix process using a file by looking at 'lsof <fullpath/filename>' command.
I think using lsof is very expensive. Also to make it accurate we need to inlcude fullpath of the file.
Is there another command that can tell if a file has a truely active... (12 Replies)
1. The problem statement, all variables and given/known data:
When looking for corefiles, include any file with core in its name. (Some UNIX/Linux systems add the PID of the process that created the core to reduce the chances of overwriting an already existing core file that might be needed. The... (6 Replies)
I have two files
File1
====
1|2000-00-00|2010-02-02||
2| 00:00:00|2012-02-24||
3|2000-00-00|2011-02-02||
File2
====
2000-00-00
00:00:00
I want the delete the patterns which are found in file 2 from file 1,
Expected output:
File1
==== (5 Replies)
Need unix commands to delete records from one file if the same record present in another file...
just like join ... if the record present in both files.. delete from first file or delete the particular record and write the unmatched records to new file..
tried with grep and while... (6 Replies)
Hi All,
I need to delete the oldest file in folder when the file count in the folder exceed 6 ( i have a process that puts the source files into this folder )
E.x : Folder : /data/opt/backup
01/01/2012 a.txt
01/02/2012 b.txt
... (1 Reply)
Hi all
i want to write program with shell script that able compare two file content and if one of lines of file have # at the first of string or nothing find same string in one of two file . remove the line in second file that have not the string in first file. for example:
file... (2 Replies)
hi,
I need a help. I used this command to list all the log files which are for more than 10 days to a text file.
find /usr/script_test -type f -mtime +10>>/usr/ftprm.txt
I want all these files listed in the ftprm.txt to be ftp in another machine and then rm the files.
Anyone can help me... (8 Replies)
I have file called "text". The contents are as below :
aaa
bbb
ccc
ddd
eee
ffff
ddd
hhhh
iiii
I want to read this file without opening and and delete the last line. How can it be done? (4 Replies)
Discussion started by: the_hunter
4 Replies
LEARN ABOUT DEBIAN
xcalev
XCALEV(1) General Commands Manual XCALEV(1)NAME
xcalev - load xcal calendar files with regular dates
SYNTAX
xcalev [ -r ][ -x ][ -f file ][ -d dir ][ year ]
DESCRIPTION
Xcalev is used to preload the calendar files for the xcal program with regular events in your life. It reads lines from a file (usually
called regular stored in your Calendar directory. Each line in the file contains three fields separated by spaces or tabs, these are: a
month name, a day in the month and some text. For example:
December 25 Christmas
Dec 31 New Year's Eve
The order of the month and the day are optional, the program deduces the day by looking whether the string contains an initial numeric
character or not. The year defaults to the current year unless the program is given a year number as an argument. This year cannot be
abbreviated to two digits because xcal
deals with years from year zero. There's a rough validity check on this.
The string from the data line is inserted in the appropriate file and will appear in your xcal date strip. Nothing will happen if the
string already exists in the file for that day. This means that it's safe to run xcalev at any time, only the strings that have altered in
the regular file will be updated.
To help with entering the same event for a number of days in one month, you can give a day range with a hyphen
Jan 16-21 Usenix SF
If you supply the -r option, xcalev will delete all the matching strings that it finds in the appropriate daily file. So, if you want to
make radical changes to the regular file, you should run xcalev with the -r option to remove all the current entries from one year, edit
the regular file and run xcalev to reload things.
OPTIONS
The -r option makes xcalev delete rather than append entries.
The -x option makes xcalev operate with Calendar files that are compatible with the xcalendar program.
The -f switch is followed by a filename gives an alternative name for the regular file. If the filename does not start with a slash or a
dot, then the name of your Calendar directory will be prepended to it.
The -d switch is followed by a directory name and specifies an alterative location for your Calendar directory. Your home directory is
prepended if the name doesn't start with a slash or a dot.
FILES
$HOME/Calendar/*
xc<dd><Mon><Year> A data file is day, Month in three letter format and the year.
xy<Year> A year directory.
xw<Day> A data file for the weekly code, one per day.
SEE ALSO xcal(1), xcalpr(1), xcal_cal(1)AUTHOR
Copyright 1993 by Peter Collinson, Hillside Systems All rights reserved.
X Version 11 R5 October 1993 XCALEV(1)