Sponsored Content
Top Forums Shell Programming and Scripting How to Fetch latest version form a file? Post 303016974 by schandra128 on Monday 7th of May 2018 09:32:09 AM
Old 05-07-2018
Lightbulb How to Fetch latest version form a file?

Hi,

I have a file where versions will be updated, i need to get latest/last updated version from that file. Could you please help?
File looks like below -
Code:
 <versions>
      <version>R20180417.006</version>
      <version>R20180421.007</version>
      <version>R20180421.008</version>
      <version>R20180421.009</version>
      <version>R20180421.048</version>
      <version>R20180421.049</version>
      <version>R20180421.050</version>
      <version>R20180421.051</version>
      <version>R20180421.052</version>
      <version>R20180421.053</version>
      <version>R20180421.054</version>
</versions>


Last edited by vbe; 05-07-2018 at 11:37 AM.. Reason: code tags please
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

What is the latest version of Unix?

I want to buy it (2 Replies)
Discussion started by: LANSTARR.COM
2 Replies

2. Shell Programming and Scripting

Latest version of a file across the servers ..

:o How do I confirm that the script on one server is latest compare to other servers? Is there any script which can tell me the latest version of a file across the servers? Thanks, (2 Replies)
Discussion started by: Sandy
2 Replies

3. Shell Programming and Scripting

search latest version of log file

Have checked the forums and couldnt locate help on this. I want to grep a log file for a pattern using a script - I need to grep the latest log file and not sure how I am able to ensure I am greping the latest log file. Here is sample of log files for yestersday and I effectively need to grep... (10 Replies)
Discussion started by: frustrated1
10 Replies

4. BSD

latest version of bsd

Any body there ? What is latest BSD version ? (4 Replies)
Discussion started by: chilaka
4 Replies

5. Shell Programming and Scripting

fetch last line no form file which is match with specific pattern by grep command

Hi i have a file which have a pattern like this Nov 10 session closed Nov 10 Nov 9 08:14:27 EST5EDT 2010 on tty . Nov 10 Oct 19 02:14:21 EST5EDT 2010 on pts/tk . Nov 10 afrtetryytr Nov 10 session closed Nov 10 Nov 10 03:21:04 EST5EDT 2010 Dec 8 Nov 10 05:03:02 EST5EDT 2010 ... (13 Replies)
Discussion started by: Himanshu_soni
13 Replies

6. AIX

Latest firmware version for P770

Dears i have a power7 P770 working in AIX 5.3 TL 11 with frimware AM730_066 is the AM730_066 frimware the latest one or not ? (6 Replies)
Discussion started by: thecobra151
6 Replies

7. Shell Programming and Scripting

Help with finding the latest modified version of a file within directories

I am trying to look into multiple directories and pluck out the latest version of a specific file, regardless of where it sits within the directory structure. Ex: The file is a .xls file and could have a depth within the directory of anywhere from 1-5 Working directory - Folder1... (6 Replies)
Discussion started by: co21ss
6 Replies

8. UNIX for Advanced & Expert Users

Need commands to fetch Guest VM OS version from Xen and KVM

Im looking for the commands that can be executed to fetch the OS Version of the VMs running on the below Hypervisors. Xen (Not the citrix Xen server, but the Xen Sever hosted on a ubuntu Machine) KVM (0 Replies)
Discussion started by: ranvirsingh
0 Replies

9. UNIX for Dummies Questions & Answers

Finding Oracle form Version UNIX

I'm trying to find the version of the underlying Oracle forms from out Unix Server. I have tried frmcmp.sh -h but I get the error frmcmp.sh -h : not found Its a Unix Sun server running an oracle database Any ideas? (1 Reply)
Discussion started by: dbajtr
1 Replies

10. Shell Programming and Scripting

Fetch the latest filename shell script

Hi I want to fetch the latest file form the list example example= filename RATE_STATE_SETUPS.20151222.ccyymmdd.hhmmss.txt File pick which have latest ccyymmdd.hhmmss list of file in directory are RATE_STATE_SETUPS.20151222.20151222.170101.txt... (5 Replies)
Discussion started by: MOHANP12
5 Replies
ISPUNCT(3)						   BSD Library Functions Manual 						ISPUNCT(3)

NAME
ispunct -- punctuation character test LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <ctype.h> int ispunct(int c); int ispunct_l(int c, locale_t loc); DESCRIPTION
The ispunct() function tests for any printing character except for space (' ') or a character for which isalnum(3) is true. The value of the argument must be representable as an unsigned char or the value of EOF. In the ASCII character set, this includes the following characters (with their numeric values shown in octal): 041 ``!'' 042 ``"'' 043 ``#'' 044 ``$'' 045 ``%'' 046 ``&'' 047 ``''' 050 ``('' 051 ``)'' 052 ``*'' 053 ``+'' 054 ``,'' 055 ``-'' 056 ``.'' 057 ``/'' 072 ``:'' 073 ``;'' 074 ``<'' 075 ``='' 076 ``>'' 077 ``?'' 100 ``@'' 133 ``['' 134 ``'' 135 ``]'' 136 ``^'' 137 ``_'' 140 ```'' 173 ``{'' 174 ``|'' 175 ``}'' 176 ``~'' The ispunct_l() function takes an explicit locale argument, whereas the ispunct() function uses the current global or per-thread locale. RETURN VALUES
The ispunct() and ispunct_l() functions return zero if the character tests false and return non-zero if the character tests true. COMPATIBILITY
The 4.4BSD extension of accepting arguments outside of the range of the unsigned char type in locales with large character sets is considered obsolete and may not be supported in future releases. The iswpunct() function should be used instead. SEE ALSO
ctype(3), iswpunct(3), ascii(7) STANDARDS
The ispunct() function conforms to ISO/IEC 9899:1990 (``ISO C90''). The ispunct_l() function conforms to IEEE Std 1003.1-2008 (``POSIX.1''). BSD
July 30, 2012 BSD
All times are GMT -4. The time now is 03:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy