Hi
I am writing a script file which sends the log files along with their size in a folder named log to a file called temp.log using the following cmd:
ls -st 190_GSTV_HUX_003QISCGSK026** >> /home/user/temp.log
the temp.log looks like this:
16 190_GSTV_HUX_003QISCGSK026_message070321.log
... (11 Replies)
Hi,
I have a text file, foo.txt, it looks something like below. In the file there is a line that gives the date in the form of: Mon Jun 15 11:09:31 2008. I need to find which date is the newest and then store certain details of that list data to another file. So, in this sample text file, I... (6 Replies)
Hi,
I need to execute a crontab based on a condition where one SH file should be executed only based on the output of a file in a folder.
I have written the following cron job which is not working.
00 01 * * * read a < /px/batch/reslut.txt && && sh /px/batch/check.sh
where my... (2 Replies)
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)
This should be a simple script, but can't find one with google search.
I just need to find the file that is in many directories, then overwrite that file with a newer version i.e.
find file.jar then overwrite with /root/file.jar
All I get in searches is substitute text with new test inside... (1 Reply)
CMD=$(find "${Release_Container}" -iname "${Release_Name}"_Release.txt)
for i in `cat $CMD`
do
if ];then
cd ${Sandbox_dir}
CMD1=$(find "${Sandbox_dir}"/* -iname "${Release_Name}" -type d | awk -F/ '{print $(NF)}' | head -1 )
if ];then
echo -e "################### CHECKOUT START... (2 Replies)
Hello,
Can you please help me one this:
I have two servers: Server A and server B.
Every day on 03.00AM in only one on these two servers (randomly)is generated one file, lets say file.txt.
I want to copy this file also to the other server.
I want to create a perl script that does... (2 Replies)
I am fairly new to programming and trying to resolve this problem. I have the file like this.
CHROM POS REF ALT 10_sample.bam 11_sample.bam 12_sample.bam 13_sample.bam 14_sample.bam 15_sample.bam 16_sample.bam
tg93 77 T C T T T T T
tg93 79 ... (4 Replies)
Dear All,
I'm new to unix scripting. I'm trying to write an utility script which has to check if one file is newer than another one. $3 $4 $5 $6 are files .txt. Help me please.
for i in $3 $4 $5 $6
do
if
then
echo "$1 is newer than $i"
else
echo "$i is newer than $1"
fi (9 Replies)
I only want the file copied if it is newer. But it still copies the file?
zip -u Ubuntu_Documents.zip ./*
cp -u Ubuntu_Documents.zip $DOCS_Backup/Ubuntu_Documents_`date +"%Y-%m-%d-%H-%M"`.zip (5 Replies)
Discussion started by: drew77
5 Replies
LEARN ABOUT MOJAVE
b::hooks::op::check5.18
B::Hooks::OP::Check(3) User Contributed Perl Documentation B::Hooks::OP::Check(3)NAME
B::Hooks::OP::Check - Wrap OP check callbacks
SYNOPSIS
# include "hook_op_check.h"
STATIC OP *my_const_check_op (pTHX_ OP *op, void *user_data) {
/* ... */
return op;
}
STATIC hook_op_check_id my_hook_id = 0;
void
setup ()
CODE:
my_hook_id = hook_op_check (OP_CONST, my_const_check_op, NULL);
void
teardown ()
CODE:
hook_op_check_remove (OP_CONST, my_hook_id);
DESCRIPTION
This module provides a c api for XS modules to hook into the callbacks of "PL_check".
ExtUtils::Depends is used to export all functions for other XS modules to use. Include the following in your Makefile.PL:
my $pkg = ExtUtils::Depends->new('Your::XSModule', 'B::Hooks::OP::Check');
WriteMakefile(
... # your normal makefile flags
$pkg->get_makefile_vars,
);
Your XS module can now include "hook_op_check.h".
TYPES
typedef OP *(*hook_op_check_cb) (pTHX_ OP *, void *);
Type that callbacks need to implement.
typedef UV hook_op_check_id
Type to identify a callback.
FUNCTIONS
hook_op_check_id hook_op_check (opcode type, hook_op_check_cb cb, void *user_data)
Register the callback "cb" to be called after the "PL_check" function for opcodes of the given "type". "user_data" will be passed to the
callback as the last argument. Returns an id that can be used to remove the callback later on.
void *hook_op_check_remove (opcode type, hook_op_check_id id)
Remove the callback identified by "id". Returns the userdata the callback had.
AUTHOR
Florian Ragwitz <rafl@debian.org>
COPYRIGHT AND LICENSE
Copyright (c) 2008 Florian Ragwitz
This module is free software.
You may distribute this code under the same terms as Perl itself.
perl v5.18.2 2011-09-10 B::Hooks::OP::Check(3)