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 OPENSOLARIS
glob
glob.h(3HEAD) Headers glob.h(3HEAD)NAME
glob.h, glob - pathname pattern-matching types
SYNOPSIS
#include <glob.h>
DESCRIPTION
The <glob.h> header defines the structures and symbolic constants used by the glob(3C).
The structure type glob_t contains the following members:
size_t gl_pathc /* count of paths matched by pattern */
char **gl_pathv /* pointer to a list of matched
pathnames */
size_t gl_offs /* lots to reserve at the beginning
of gl_pathv */
The following constants are provided as values for the flags argument:
GLOB_APPEND Append generated pathnames to those previously obtained.
GLOB_DOOFFS Specify how many null pointers to add to the beginning of gl_pathv.
GLOB_ERR Cause glob() to return on error.
GLOB_MARK Each pathname that is a directory that matches pattern has a slash appended.
GLOB_NOCHECK If pattern does not match any pathname, then return a list consisting of only pattern.
GLOB_NOESCAPE Disable backslash escaping.
GLOB_NOSORT Do not sort the pathnames returned.
The following constants are defined as error return values:
GLOB_ABORTED The scan was stopped because GLOB_ERR was set or (*errfunc)() returned non-zero.
GLOB_NOMATCH The pattern does not match any existing pathname, and GLOB_NOCHECK was not set in flags.
GLOB_NOSPACE An attempt to allocate memory failed.
GLOB_NOSYS Reserved.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO glob(3C), attributes(5), standards(5)SunOS 5.11 10 Sep 2004 glob.h(3HEAD)