Yes, I've tryed it and works. Tough, in the example, the script only takes the file name and echoes it. From that, doing the rest is easy.... For instance:
Code:
#!/bin/ksh
set -A ARGS $@
FILE=${ARGS[$(expr $# - 1)]}
echo $@ | sed s/$FILE// >> $FILE
Hello,
Which command in unix can tell whether a file is being used/written by another process.
e.g. If one process is copying a very big file in some directory and there is another cronjob process which checks for a new file and in this directory and process the file. I want to check, if the... (4 Replies)
Hi,
I have a directory that is used to store files generated by another application. Each file is huge and can take some time to produce.
I am writing a shell script to check the names and dates of the files and do some functions on the ones that are not being written out.
My question is, if I... (3 Replies)
Hello All
I am attempting to write a shell script (bourne shell script) which will copy a tar'd and compressed file from a directory to a staging area but will not know whether the file is still open for write since files are being ftp's to my site at random times during the day.
Once I am... (14 Replies)
I'm using growisofs to write DVD, e.g.
$ growisofs -Z /dev/dvd -V "Personal Data, `date +"%b, %d %Y"`" -R -J /mnt/d/*
How can I test whether data was written correctly? md5sum or so? (0 Replies)
Hi experts,
I have two question about expect script
questions 1
send "tar -xjvf a.tar\r"
send "ifconfig\r"
I want to know if it just run "ifconfig after "tar -xjvf a.tar complete. or the two cmd run at the same time
question 2
after I use the expect to ssh to the... (1 Reply)
I'm wondering how programmers develop new Web Development languages because I want to learn how everything begins from the start. Let's say I'm planning to write a new language for the Web. How do I do this? Is there anyone who knows about the way Web Development languages first appear ? I'm asking... (1 Reply)
Just learned c language ,but I don't know where to start to write some applications under Linux ,I really appreciate it if anybody can help me find some books or sites on it. (2 Replies)
hi all
syslog is not getting written.
i am getting following two logs snmpd.log & authlog logs.
please tell what are two logs snmpd.log & authlog logs.
why syslog is not written. (16 Replies)
Subject: Debugging a program written in two languages
Platform: Linux (Kubuntu)
I am trying to debug a C application with bindings to some simple functions written in Ada using the GNAT Programming Studio IDE (GPS). The main entry point is in C. The debugger is gdb.
I managed to compile... (0 Replies)
Discussion started by: NiGHTS
0 Replies
LEARN ABOUT DEBIAN
xt-customize-image
XT-CUSTOMIZE-IMAGE(8) Perl Programmers Reference Guide XT-CUSTOMIZE-IMAGE(8)NAME
xt-customize-image - Customize a freshly installed copy of GNU/Linux
SYNOPSIS
xt-customize-image [options]
Help Options:
--help Show this scripts help information.
--manual Read this scripts manual.
--version Show the version number and exit.
Debugging Options:
--verbose Be verbose in our execution.
Mandatory Options:
--location The location of the new installation
--dist The name of the distribution which has been installed.
All other options from xen-create-image, such as the new IP address(es)
to give to the new instance, will be passed as environmental variables.
NOTES
This script is invoked by xen-create-image after it has created a
fresh installation of Linux withing a temporary location.
This script will be invoked with a full copy of the arguments from
xen-create-image in its environment, along with several command line
arguments.
The command line arguments which are mandatory are:
--location - The temporary installation root of the new install
--dist - The distribution which has been installed.
HOOK SCRIPTS
The distribution name is used to locate an appropriate collection
of scripts, or hooks, to execute to do the actual customisation.
The hooks will each be executed with a single parameter which is
the directory path to the new instance. This argument is taken from
the --location option.
For the distribution named 'foo' the scripts will be loaded and
executed from '/usr/lib/xen-tools/foo.d'. Each executable will
be loaded and executed in sorted order.
AUTHORS
Steve Kemp, http://www.steve.org.uk/
Axel Beckert, http://noone.org/abe/
StA~Xphane Jourdois
LICENSE
Copyright (c) 2005-2009 by Steve Kemp, (c) 2010 by The Xen-Tools Development Team. All rights reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The LICENSE file contains the
full text of the license.
4.3.1 2012-06-30 XT-CUSTOMIZE-IMAGE(8)