11-05-2008
unix script that will pick up first 10 file
Suppose I have a unix file which contain a lost of 60 files like
filename1
filename2
...
..
...
filename60
I want to write a unix script that will pick up first 10 files in first run
10-20 files in 2 run
20-30 files in 3 run
30-40 files in 4 run
40-50 files in 5 run
50-60 files in 6 run
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi ,
I have a file abc.txt which actually contains a directory and file list
-rwxrwxr-x 1 dmadmin mmasapp 334 Dec 03 2001 aafs_006.ksh
-rwxrwxr-x 1 dmadmin mmasapp 1270 Nov 13 2001 mcl_deposit_ftp.ksh
-rwxrwxr-x 1 dmadmin mmasapp 925 Oct 31 2001 ... (1 Reply)
Discussion started by: viv1
1 Replies
2. Shell Programming and Scripting
Hi, I have a problem I am trying to solve with bash.
I need to search in a file system (data base) with hundreds of directories and thousands of subdirectories and millions of files. The files have a specific format with a header that gives the properties. Directories are organized so... (1 Reply)
Discussion started by: majest
1 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I wrote a script to pick files based on some logic. when I execute my script, I get the below message ( I bolded the lines in the script where this error message shows up), it says that files are not available and it is a valid scenario if the files are not available and I don't know how... (9 Replies)
Discussion started by: Vijay81
9 Replies
4. Shell Programming and Scripting
Hello,
i am having file details having elements mentioned below
Asia jan 18
Europe Jan 19
America Jan 20
I made script but it picks all the elements, i want to pick the elements according to the date to run the script i made cron job.
Please advise how it can work.... (12 Replies)
Discussion started by: rajjev_saini123
12 Replies
5. Shell Programming and Scripting
hi i need shell scrip to pick the oldest file...
i.e i need a script to pick the oldest file
I had input files in my input folder that are created on saturday,monday,tuesday .. i want a script such that first the script should pick saturday file ,then monday and then file created on... (5 Replies)
Discussion started by: hemanthsaikumar
5 Replies
6. Post Here to Contact Site Administrators and Moderators
Hi,
Below is a shell script that i made:-
#!/bin/ksh
#path=/opt/tibco/shared/adaptadores/SSCC/EVEREST/input/
if ;
then
echo "ZIP Exists and now Processing"
for files in /opt/tibco/shared/adaptadores/SSCC/EVEREST/input/T010B04.*
do
unzip $files
echo "Files Unzipped"
echo $files... (1 Reply)
Discussion started by: mmtrexon
1 Replies
7. Shell Programming and Scripting
Hi,
Below is a shell script that i made:-
#!/bin/ksh
#path=/opt/tibco/shared/adaptadores/SSCC/EVEREST/input/
if ;
then
echo "ZIP Exists and now Processing"
for files in /opt/tibco/shared/adaptadores/SSCC/EVEREST/input/T010B04.*
do
unzip $files
echo "Files Unzipped"
echo $files... (4 Replies)
Discussion started by: mmtrexon
4 Replies
8. Shell Programming and Scripting
Hi.,
I need in perl type ...where this is an example :
assume a directory has 3 files namely:
file1_1445566_201501022.txt
file1_1445566_201502024.txt
file1_1445566_201503009.txt
where ,after second underscore, the number is in YYYYMMDD time-stamp format, I need perl script to pick up... (3 Replies)
Discussion started by: alnhk
3 Replies
9. Shell Programming and Scripting
Hi ,I got one data file from external source and I have to load it in database through sql loader. I want to add 2 columns in database,one is file name and one is time of the file received on server.
-rwxr-x--- 1 user user 238 Jun 03 16:32 90936264971326030616.ctr
From above case,... (21 Replies)
Discussion started by: Ruchika
21 Replies
10. Shell Programming and Scripting
Hi ,
Can anyone help me how do perform below requirement in unix.
Step1:we will receive multiple files weekly with same name(as below) in a folder(In folder we will have other files also def.dat,ghf.dat)
Filenames:
1) abc_20171204_052389.dat
2)abc_20171204_052428.dat
DON'T modify... (23 Replies)
Discussion started by: sunnykamal59
23 Replies
LEARN ABOUT ULTRIX
web2png
WEB2PNG(1) Graphics WEB2PNG(1)
NAME
web2png - convert a web tree from using GIFs to using PNGs
SYNOPSIS
web2png [-adnrtv] [directory...]
DESCRIPTION
Web2png is a front end for gif2png(1) that automatically converts entire web page hierarchies from using GIFs to using PNGs. It does image
conversion and patches IMG SRC references in web pages.
The arguments to web2png must be directories; if none are given, the current directory is assumed.
In each directory, web2png tries to convert every GIF to a PNG. It leaves alone GIFs that have multiple images, because these will not
display properly in all current browsers. It also does not reconvert GIFs that already have corresponding PNGs (e.g. the same name except
for the .gif file extension). The original GIFs are left in place.
Web2png tracks successful conversions. It then looks at each HTML, secure HTML, HTML inclusion, PHP page, JavaScript program or Cascading
Style Sheet under the argument directories (extensions html, shtml, .inc, .php, .js, .css). In these pages, it fixes each reference to each
successful converted GIF to point at the PNG. References in relative HREF and BACKGROUND tags are recognized by filename and fixed (any
base directory declared by a BASE tag will be be prepended to the relative URL). References that are HTTP URLs are matched against the list
of convertible GIFs by basename; if there is such a match, the contents of the URL is retrieved and compared to the convertible GIF. If
both basename and data match, the HTTP reference is fixed. If the pages are under RCS version control, they're checked out for modification
before being altered; otherwise, a copy of the original of each modified web page is left in the same directory, with the additional
extension .bak.
The following options change the behavior of the program:
-a
Convert all GIF files, including those with multiple images.
-d
Delete originals. Removes all GIFs with corresponding PNGs, and all .bak files.
-n
Make no changes. With this option, web2png reports on what needs to be done (and on GIFs that have multiple images), but neither
converts GIFs nor touches web pages.
-r
Reverse. Restore all HTML/SHTML/PHP pages from the .bak files created by a previous run (or, if the files were under version control,
revert them). Remove PNGs with corresponding GIFs.
-v
Verbose. Utter more trace information about the conversion process. Web2png can be run on a directory that has already been partly
converted by previous runs; it will do the minimum necessary amount of work. The changes it makes will be fully reversible with -r
until you run it in -d mode. Web2png is written in Python. Python 1.5.2 or better must be installed and accessible on your system in
order for web2png to run.
NOTE
Sometimes it's possible to convert transparent GIFs without altering the appearance of the page, by knowing from context that they will
always place within an area of fixed and solid color. Web2png can't deduce when this will be, so it doesn't try; but it may be useful to
apply gif2png with the -b option by hand.
KNOWN PROBLEMS
The algorithm for fixing HTTP URLs is not foolproof. It could be confused into incorrectly patching an HTTP URL reference to a GIF into an
invalid reference to a PNG if the GIF matches a local target GIF by both basename and binary content, but actually lives on another host.
This program does not automatically convert CGIs; you'll have to do that by hand. Other dynamic-content methods (such as server-side
inclusions) may also require hand-hacking.
The program cannot tell converted from preexisting PNGs; if you have PNGs with the same stem name as corresponding GIFs but carrying
different information, the -r mode will clobber them.
SEE ALSO
gif2png(1)
AUTHORS
Eric S. Raymond <esr@thyrsus.com>, October 1999.
Slightly modified for Debian by Aaron Isotton <aaron@isotton.com>.
web2png 03/08/2012 WEB2PNG(1)