Hi All,
How do I get only the files with the .csv extension. I have a shell script something like below:
#!/usr/bin/
#Directory to scan for files
SCANDIR="/cmb/data/exstream/scriptslogs/";
LOGFILE="/cmb/data/exstream/scriptslogs/test.log";
cd $SCANDIR
for FILE in * ; do
FILENAME=$FILE... (9 Replies)
I am brand new to hp unix systems. I see some files without extension on this system. If I type name of the file it shows me so many detail but does not take me back to command prompt. What are these files and how do I come back to command prompt? Please help (1 Reply)
Hi,
I have 1000 of files in a folder with the file extension as .csv
In this some of the files are already zipped and its looks like filename.csv.gz
Now i need to zip all the files in the folder to free some disk space. When i give gzip *.csv
It prompts me to overwrite filename.csv.gz... (5 Replies)
Hi,
I know that to list files with no extension, we can use..
ls -1 | grep -v "\."
And to list .prog files, we can use..
ls -1 *.prog
or
ls -1 | grep '.prog$' (4 Replies)
I encountered a weird issue with globbing in perl not returning all files, while I was testing out a script for recursive dir-processing on my Synology NAS.
Basically it didn't show (/match?) all the files in a specific directory. If I move the file to a different directory or even rename it, it... (2 Replies)
Hi, I'm trying to do a script that move .Gz extension (one by one) in a new repertory called old-logs and then copy what's inside old-logs to a new.log but adding a date like this (something. gz: 2012:12:09).
thanks in advance for your answers. (5 Replies)
currently in my directories
$ ls -lrth
total 32K
-rw-r--r-- 1 oracle oinstall 864 Feb 25 16:01 cor_bin_gateway_cnt.sql
-rw-r--r-- 1 oracle oinstall 782 Feb 25 16:01 mer_bin_gateway_cnt.sql
I want to rename files with *.sql to *.mv extension, but when I execute the following
$ mv... (1 Reply)
hi,
i am having a certain files in a folder where i need to replace the extension with similar file name
for eg
1.csv
2.csv
3.csv
4.csv
i need to replace the extension
1.csv
1.txt
2.csv
2.txt
3.csv
3.txt (3 Replies)
Hi
I need some suggestion on glob function.
I am trying to write a python program to grep some specific files in a particular directory.
In the directory i have some files like below
abc.log
abc.pid
abc.tar
gadd.tar
gat.log
gat.tar
in this directory i need to grep onlu my hostname files,... (1 Reply)
Hi All,
I want to fetch the files based on .done file and display the .csv files and Wil take .csv files for processing.
1.I need to display the .done files from the directory.
2.next i need to search for the .Csv files based on .done file.then move .csv files for the one directory
... (2 Replies)
Discussion started by: girija.g6
2 Replies
LEARN ABOUT CENTOS
file::dosglob
File::DosGlob(3pm) Perl Programmers Reference Guide File::DosGlob(3pm)NAME
File::DosGlob - DOS like globbing and then some
SYNOPSIS
require 5.004;
# override CORE::glob in current package
use File::DosGlob 'glob';
# override CORE::glob in ALL packages (use with extreme caution!)
use File::DosGlob 'GLOBAL_glob';
@perlfiles = glob "..\pe?l/*.p?";
print <..\pe?l/*.p?>;
# from the command line (overrides only in main::)
> perl -MFile::DosGlob=glob -e "print <../pe*/*p?>"
DESCRIPTION
A module that implements DOS-like globbing with a few enhancements. It is largely compatible with perlglob.exe (the M$ setargv.obj
version) in all but one respect--it understands wildcards in directory components.
For example, "<..\l*b\file/*glob.p?"> will work as expected (in that it will find something like '..libFile/DosGlob.pm' alright). Note
that all path components are case-insensitive, and that backslashes and forward slashes are both accepted, and preserved. You may have to
double the backslashes if you are putting them in literally, due to double-quotish parsing of the pattern by perl.
Spaces in the argument delimit distinct patterns, so "glob('*.exe *.dll')" globs all filenames that end in ".exe" or ".dll". If you want
to put in literal spaces in the glob pattern, you can escape them with either double quotes, or backslashes. e.g. "glob('c:/"Program
Files"/*/*.dll')", or "glob('c:/Program Files/*/*.dll')". The argument is tokenized using "Text::ParseWords::parse_line()", so see
Text::ParseWords for details of the quoting rules used.
Extending it to csh patterns is left as an exercise to the reader.
EXPORTS (by request only)
glob()
BUGS
Should probably be built into the core, and needs to stop pandering to DOS habits. Needs a dose of optimizium too.
AUTHOR
Gurusamy Sarathy <gsar@activestate.com>
HISTORY
o Support for globally overriding glob() (GSAR 3-JUN-98)
o Scalar context, independent iterator context fixes (GSAR 15-SEP-97)
o A few dir-vs-file optimizations result in glob importation being 10 times faster than using perlglob.exe, and using perlglob.bat is
only twice as slow as perlglob.exe (GSAR 28-MAY-97)
o Several cleanups prompted by lack of compatible perlglob.exe under Borland (GSAR 27-MAY-97)
o Initial version (GSAR 20-FEB-97)
SEE ALSO
perl
perlglob.bat
Text::ParseWords
perl v5.16.3 2013-03-04 File::DosGlob(3pm)