Hello,
I am a beginner with korn shell scripting. I have got a text file that gets produced every night and I need to transfer it to a windows shared area.
Is there any command line script (e.g FTP) that I could use to transfer the file automatically without manual intervention everyday?
Any... (4 Replies)
Sorry im really new here this is my second post today!
My question is, im trying to write a script and i want to output to a text file but i want each text file to be different so for instance log.txt, log1.txt, log2.txt ect how would i do that? (7 Replies)
Hi all,
With curl I can fetch a tar archive from a web server which contains a file ending with .scf which I am interested in. Unfortunately the file name may vary and the subdirectory inside the tar archive may change. I can manually browse the directory structure and extract the file and then... (3 Replies)
Hi
I have a folder will all the file ftp in everyday. I have to go in every morning to check to see everynight have all the 2000+ file have been all FTP in.
so every morning i will check like this
# ls -l *_20080904*_20080904* |wc
if there is 2714 that mean is correct.
File name:... (13 Replies)
i have got many files like this in my folder temp(say)
imp_02042008.txt for date 02-04-2008
imp_03092009.txt for date 03-09-2009
imp_25112009.txt for date 25-11-2009
...................
........
in some folder.
and one of my shell code uses one of the above files based on date.... (0 Replies)
i have got many files like this in my folder temp(say)
imp_02042008.txt for date 02-04-2008
imp_03092009.txt for date 03-09-2009
imp_25112009.txt for date 25-11-2009
...................
........
in some folder.
and one of my shell code uses one of the above files based on date.... (9 Replies)
Hi All,
I have a query regarding the automatic patching on files in unix
Suppose I have a file names - abc.txt and I take its backup as abc.txt_bkp and then do some changes in abc.txt and save it as abc.txt_new.
Now I want to automatically apply the changes done on abc.txt to... (0 Replies)
hi everyone,
I just began to be interested about the bash access.
I buy a time ago a Raspberry pi, I installed raspbmc and now I would like build a bash to copy everyday all new files inside my server directly on the hard drive in my Pi.
So my HDD is directly plug on my pi with usb connect,... (4 Replies)
Hello There,
Here is the use cases
Input folders
dropbox/project/abc/
dropbox/project/pqr/
dropbox/project/lmn/
dropbox/project/xyz/
Target Folders
/data/abc/
/data/pqr/
/data/lmn/
/data/xyz/ (2 Replies)
Discussion started by: TreasureCookies
2 Replies
LEARN ABOUT DEBIAN
genplotfiles
GENPLOTFILES(1) colplot GENPLOTFILES(1)NAME
genplotfiles - utility to help automate creation of collectl plot file from raw ones
SYNOPSIS
/opt/hp/colplot/genplotfiles.pl -outdir [-switches]
DESCRIPTIONS
This utility is not intended to meet all plot file creation needs, but quite frankly should meet most. Features not provided with this
utility are best realized by running collectl directly in playback mode (see collectl -p). It is therefore important to understand what
this utility will and will not do for you before building an automation strategy around it.
The algorithm used is fairly simple - genplotfiles examines each collectl raw file to see it it falls within the data ranges (if specified)
and contains a matching hostname (if specified). If a plot file already exists, the timestamps are compared and the raw file skipped if
its newer than the plotfile.
Any raw files that pass all these tests are then passed to collectl with their timestamp wildcarded. The result is all raw files for that
host/date will be processed. This means if you copy over collectl raw files multiple times over the course of the day using rsync, you can
immediately genererate up-to-date plots for them using genplotfiles. Furthermore, you won`t even need any date parameters if the older
plot files are alreay up to date.
For an example of what a cron job that aggregates multiple collectl logs onto a single system for plotting purposes, see crontab.sh in the
same directory as this script.
SWITCHES
All switches are optional with the exception of -outdir:
-colbin path-to-collectl
This points to collectl and is only necessary if /usr/sbin is not in your path or you`ve chosen to install collectl in a non-stan-
dard directory.
-debug number
Primarily for development, will provide intermediate processing information based on its value. See souce for details.
-force
Always generate plot files even in there is an existing one that is newer than the latest raw file. This will be necessary if you
want to rerun this script and just change the value of -subsys.
-help
Print a summary of available switches.
-host string
Only process files that contain this string in their hostname portion of the filename.
-indir directory
Directory where to look for collectl logs. The default is /var/log/collectl and is therefore only necessary if your logs are in a
non-standard location.
-outdir directory
Directory into which to write the plottable files. This field is required.
-fromdate date
Ignore files with a datestamp in their name less that this value. The default is 20050101 and so defaults to all files. The value
of `yesterday` is also recognized to simplify scripts that call this.
-thrudate date
Ignore files with a datestamp in their name with a datestamp greater than this value. The default is the current day and one can
also specify a value of `yesterday`.
-subsys string
Instead of using the default subsystems for which data was collected, generate output files based on this set. There are basically
two reasons for doing this. The first is that you may want to reduce the size of the plot files, though with compression there is
rarely much point in this. The second is if you`ve asked collectl to collect summary data but want to plot detail data.
See the colplot FAQ for more information.
AUTHOR
This program was written by Mark Seger (mjseger@gmail.com).
Copyright 2005 Hewlett-Packard Development Company, L.P.
SEE ALSO LOCAL OCTOBER 2005 GENPLOTFILES(1)