01-03-2017
Shell script to loop through files
Hi Team,
I am new to shell scripting. I have the below requirement
1) Say if i am searching for 20160815 in a directory /dir
2) Now i need to get the files present in dir whose time stamp in greater than or equal to 20160815
3) Then i need to find the string 20160815 from the set of files received in point 2
4) Now i need to get the final file name as output
I visited many forums to understand how to loop through files. Please help me in this regard
Thanks and Regards
Raj
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
Following is the code . When I give input as Bangalore,its dospalying Welcome to Hitech City. But say , if I select Delhi or US, its not displaying the corresponding message. Its still says Welcome to Hitech City.
Seems that it not entering in the elif part. Please suggest.
#!... (4 Replies)
Discussion started by: pankajkrmishra
4 Replies
2. Shell Programming and Scripting
I am currently trying to find a way to loop through files in a given directory and for each file modify a ctl file and sql load it. I have been using the sed command to change the infile, badfile parameters of the control file. I have not yet tried to sql load it.
Requirement: files are ftp to... (1 Reply)
Discussion started by: dba_nh
1 Replies
3. AIX
I have av script that loops through some statistic files to create a report. We would like to only loop through non-empty files as these files create an empty report-line.
I have figured out how to find the non-empty files, but not how to loop through only those files.
Here is the code that finds... (4 Replies)
Discussion started by: Tessa
4 Replies
4. Shell Programming and Scripting
I just want to write a little script, that reads the lines from a file, echos somthing in a new tmp.file and then do some commands whith the tmp.files.
while read -r line
do
echo "TEST=" > tmp.$$
echo "$line" >> tmp.$$
any_command < tmp.$$
done < $INPUTFILE
But I think I have to... (2 Replies)
Discussion started by: elifchen
2 Replies
5. Shell Programming and Scripting
Dear experts,
i am quite new to shell script please any one can help me in this regard
i would like write a script which takes input in the form
>./Test.sh a,10,b,20,c,30...
in this way i can give input in any number which is not constant
in the end through loop i want to... (3 Replies)
Discussion started by: vin_pll
3 Replies
6. Shell Programming and Scripting
Hi everyone,
I have n number of data in my file "temp" in following order.In each line table_name and
column_name are different.input data is in same format each query in three lines.
ALTER TABLE table_name
ADD ( column_name1 VARCHAR2(10),
column_name2 VARCHAR2(70) );
... (23 Replies)
Discussion started by: alisha
23 Replies
7. UNIX for Dummies Questions & Answers
I have multiple input files that I want to manipulate using a shell script. The files are called 250.1 through 250.1000 but I only want the script to manipulate 250.300 through 250.1000. Before I was using the following script to manipulate the text files:
for i in 250.*; do
|| awk... (4 Replies)
Discussion started by: evelibertine
4 Replies
8. UNIX for Dummies Questions & Answers
Hello,
So I have approximately 300 files of raw data (.txt) files that I am using to perform statistical analysis. I have been able to construct a Fortran program that is able to perform my statistical analysis on a file by file basis.
However, I now want to be able to loop program through... (19 Replies)
Discussion started by: Jimmyd24
19 Replies
9. Shell Programming and Scripting
Hi,
I have multiple files in a directory. Each file will have a header.I have to check if any of the files has 0 rows other than the header then I have to delete the files.
Here “ Empty file” in my case means a file has header information but no data. I have to delete such files.
If the file... (2 Replies)
Discussion started by: ganesnar
2 Replies
10. Shell Programming and Scripting
Hi Friends, I have a file. the content is as below:
file1:
/A/B/C/abc.txt
2013-07-28 13:50:00,2013-07-31 01:00:00,5,710
/A/B/C/xyz.txt
2011-09-21 18:30:00,2013-07-30 06:15:00,15,65135
2009-11-09 18:00:00,2011-09-02 09:00:00,5,12345
2013-07-28 13:50:00,2013-07-31 01:00:00,5,710
... (2 Replies)
Discussion started by: vsachan
2 Replies
LEARN ABOUT DEBIAN
globus-update-certificate-dir
GLOBUS-UPDATE-CERT(8) GSI-C OpenSSL Commands GLOBUS-UPDATE-CERT(8)
NAME
globus-update-certificate-dir - Update symlinks in the trusted CA directory
SYNOPSIS
globus-update-certificate-dir [-help] [-d DIRECTORY]
DESCRIPTION
The globus-update-certificate-dir program creates symlinks between files (CA certificates, certificate revocation lists, signing policy,
and certificate request configuration files) using the certificate hash the installed version of OpenSSL uses. OpenSSL 1.0.0 uses a
different name hashing algorithm than previous versions, so CA distributions created with older versions of OpenSSL might not be able to
locate trusted CAs and related files. Running globus-update-certificate-dir against a trusted CA directory will add symlinks to the files
to the hash if needed.
The full set of command-line options to globus-update-certificate-dir consists of:
-help
Display a help message to standard output and exit
-d DIRECTORY
Create links in the trusted CA directory DIRECTORY instead of using the default search path.
ENVIRONMENT
If the following variables affect the execution of globus-update-certificate-dir
X509_CERT_DIR
Default trusted certificate directory.
HOME
Path to the current user's home directory.
GLOBUS_LOCATION
Path to the Globus installation.
University of Chicago 02/18/2010 GLOBUS-UPDATE-CERT(8)