Sponsored Content
Full Discussion: Retaining latest file
Top Forums Shell Programming and Scripting Retaining latest file Post 302901832 by SriniShoo on Friday 16th of May 2014 12:59:20 AM
Old 05-16-2014
Code:
 
if [[ anil_111 -nt anil_222 ]]; then
  rm anil_222
else
  rm anil_111
fi

 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Retaining timestamp on copy of a file

While copying, how we can retain the same date for new file as it was on the old file. (1 Reply)
Discussion started by: param_it
1 Replies

2. Shell Programming and Scripting

retaining file path

hi all, Is there any way to retain file path? echo "Please enter your old filename" read a #user input : /blah/blah1 echo "please enter the new filename" read b #user input : dumb mv $a $b What i would like to do is for the user to enter just the "filename" for the new filename... (2 Replies)
Discussion started by: c00kie88
2 Replies

3. Shell Programming and Scripting

How do I get the name of latest file?

1) How do I get the name of latest file in a variable? 2) Is it safe to delete all files from a dir I am doing cd $dir_name if return_code > 0 rm * fi what are other alternates to delete all files from a dir in a shell script? :) (5 Replies)
Discussion started by: Hangman2
5 Replies

4. Shell Programming and Scripting

how to get the latest file

I am trying to scp the latest file which ends with "_abc.log". Can some help me figure out how can do that? (3 Replies)
Discussion started by: shehzad_m
3 Replies

5. Shell Programming and Scripting

get latest file

i have the following in my directory x: 3 files with the word "LIST" inside the files 2 files without the word "LIST" 1 folder (sudirectory) i want to get the filename of the latest file (timestamp) with the word "LIST". by the way the script and the list of files are in seperate... (4 Replies)
Discussion started by: inquirer
4 Replies

6. Shell Programming and Scripting

To get the latest file

Hi Experts Team, I wish to store the latest file name of partcular pattern in the remote server in a variable. i tried this LATEST_FILE=`ssh ${USER_ID}@${REMOTE_HOSTNAME} 'ls -t ${SOURCE_DIRECTORY}/${SOURCE_FILEPATTERN}'` but its nt working..pls guide me.. Regards, Kanda (2 Replies)
Discussion started by: spkandy
2 Replies

7. Shell Programming and Scripting

Shell script to get the latest file from the file list and move

Hi, Anybody help me to write a Shell Script Get the latest file from the file list based on created and then move to the target directory. Tried with the following script: got error. A=$(ls -1dt $(find "cveit/local_ftp/reflash-parts" -type f -daystart -mtime -$dateoffset) | head... (2 Replies)
Discussion started by: saravan_an
2 Replies

8. Shell Programming and Scripting

Retaining file versions based on input parameter

Hello Forum. I have the following files in one directory: abc_july01_2013.txt abc_july02_2013.txt abc_july03_2013.txt abc_july04_2013.txt abc_july05_2013.txt abc_july06_2013.txt abc_july07_2013.txt abc_july08_2013.txt If I want to be able to keep the last 5 versions of the file and... (4 Replies)
Discussion started by: pchang
4 Replies

9. Shell Programming and Scripting

sed Command on Multiple Files and retaining the same file name

Hi All I am trying to run sed command to remove first 2 charcaters from a file on Multiple Files in my directory and what to retain the same file name . I want to know how to retain the same file name but with changes . Can some one please let me know how to proceed with this . ... (7 Replies)
Discussion started by: honey26
7 Replies

10. Shell Programming and Scripting

Picking the latest file based on a timestamp for a Dynamic file name

Hi , I did the initial search but could not find what I was expecting for. 15606Always_9999999997_20160418.xml 15606Always_9999999998_20160418.xml 15606Always_9999999999_20160418.xml 9819Always_99999999900_20160418.xml 9819Always_99999999911_20160418.xmlAbove is the list of files I... (4 Replies)
Discussion started by: chillblue
4 Replies
Locale::Codes::LangExt(3pm)				 Perl Programmers Reference Guide			       Locale::Codes::LangExt(3pm)

NAME
Locale::Codes::LangExt - standard codes for language extension identification SYNOPSIS
use Locale::Codes::LangExt; $lext = code2langext('acm'); # $lext gets 'Mesopotamian Arabic' $code = langext2code('Mesopotamian Arabic'); # $code gets 'acm' @codes = all_langext_codes(); @names = all_langext_names(); DESCRIPTION
The "Locale::Codes::LangExt" module provides access to standard codes used for identifying language extensions, such as those as defined in the IANA language registry. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default IANA language registry codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying language extensions. A code set may be specified using either a name, or a constant that is automatically exported by this module. For example, the two are equivalent: $lext = code2langext('acm','alpha'); $lext = code2langext('acm',LOCALE_LANGEXT_ALPHA); The codesets currently supported are: alpha This is the set of three-letter (lowercase) codes from the IANA language registry, such as 'acm' for Mesopotamian Arabic. This is the default code set. ROUTINES
code2langext ( CODE [,CODESET] ) langext2code ( NAME [,CODESET] ) langext_code2code ( CODE ,CODESET ,CODESET2 ) all_langext_codes ( [CODESET] ) all_langext_names ( [CODESET] ) Locale::Codes::LangExt::rename_langext ( CODE ,NEW_NAME [,CODESET] ) Locale::Codes::LangExt::add_langext ( CODE ,NAME [,CODESET] ) Locale::Codes::LangExt::delete_langext ( CODE [,CODESET] ) Locale::Codes::LangExt::add_langext_alias ( NAME ,NEW_NAME ) Locale::Codes::LangExt::delete_langext_alias ( NAME ) Locale::Codes::LangExt::rename_langext_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangExt::add_langext_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangExt::delete_langext_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes::API man page. SEE ALSO
Locale::Codes The Locale-Codes distribution. Locale::Codes::API The list of functions supported by this module. http://www.iana.org/assignments/language-subtag-registry The IANA language subtag registry. AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 2011-2013 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.18.2 2013-11-04 Locale::Codes::LangExt(3pm)
All times are GMT -4. The time now is 03:58 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy