Sponsored Content
Top Forums UNIX for Beginners Questions & Answers To get the id value dynamically Post 303031816 by Kumar786 on Wednesday 6th of March 2019 05:36:39 AM
Old 03-06-2019
To get the id value dynamically

Hi,

I have .html file and need to get the id value based on the latest modified date from the html file.

output : 1456.

Thanks in advance

Here is the .html file

Code:
<html>
<head><title>Index</title>
</head>
<body>
<h1> BI EI Team</h1>
<pre>ID   Last modified      Size</pre><hr/>
<pre>
<a href="1456/">1456/</a>  01-Mar-2019 15:49    108MB
<a href="4561/">4561/</a>  28-Feb-2019 11:08    121MB
</pre>
<hr/>
</body>
 </html>



Moderator's Comments:
Mod Comment Please use CODE tags as required by forum rules!

Last edited by RudiC; 03-06-2019 at 06:41 AM.. Reason: Added CODE tags.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

getting value from field dynamically

how i do pass in field number when cutting, I tried to do this: but it says 11-1: not found (12 Replies)
Discussion started by: finalight
12 Replies

2. Shell Programming and Scripting

Spliting the file dynamically

i am creating the file , when this file reaches the size 2 GB, i need one message or fire (4 Replies)
Discussion started by: kingganesh04
4 Replies

3. Shell Programming and Scripting

Dynamically locating a file

Hi, I have a requriement where in I need to install a s/w by executing the installable file through a script. The script currently contains the path of the installable file. I need to now update the script accordingly such tht it identifies the location of the installable file automatically and... (1 Reply)
Discussion started by: yoursdavinder
1 Replies

4. Shell Programming and Scripting

set array name dynamically

Hi, I am trying to name a set of arrays dynamically named as @array_$i (The $i will mean that I obtain a set of arrays called: @array_1 @array_2 @array_3 etc. i tried various methods like @array_$i @{array_$i} etc. any ways to do this Thanks (4 Replies)
Discussion started by: esham
4 Replies

5. Shell Programming and Scripting

Dynamically create arrays

I have a bash challenge. I have several virtualization hosts for which I need to collect VM information. I need to dynamically create an array for each host. The contents of the array should be the list VMs running on the host. Here's the logic; I just need someone to help me with the details:... (0 Replies)
Discussion started by: EdgarTorres
0 Replies

6. Programming

Dynamically allocated structures in C

I have a pointer to a structure containing an integer pointer: struct members { int id; int *neigh; }; The number of members N and its neighbors M change as the code runs, so I allocate the memory dynamically: members *grid = malloc(sizeof(members)*N); for(i=0;i<N;i++)... (2 Replies)
Discussion started by: brinch
2 Replies

7. Shell Programming and Scripting

Dynamically choosing the interpreter

Hi, Is it possible to choose the inerpreter conditionally. For example, if whereis bash returns /usr/bin/bash then i need to choose #!/usr/bin/bash else i need to use #!/usr/bin/sh. Is it possible to achieve in a shell script? Thanks (1 Reply)
Discussion started by: pandeesh
1 Replies

8. Shell Programming and Scripting

Swap of fields dynamically

Dear Friends, I have file a.txt 1|2|3|4|5|6|7|8 a|b|c|d|e|f|g|h i am using the below code to swap the fields in file awk -F\| '{print $5,$1,$2,$3,$4,$6,$7,$8}' OFS=\| a.txt > output.txt output.txt 5|1|2|3|4|6|7|8 e|a|b|c|d|f|g|h The above command is working fine. I am... (4 Replies)
Discussion started by: i150371485
4 Replies

9. Shell Programming and Scripting

How to dynamically name as function in shell?

Hi all, Does anyone know if it possible to append a parameter to a function name? Something like the following: function tnsrec_${SERVICE_NAME} { code.. } Any ideas? (6 Replies)
Discussion started by: jonnyd
6 Replies

10. UNIX and Linux Applications

Concatenation of different reports dynamically

Hi, I have the following reports that get generated every 1 hour and this is my requirement: 1. 5 reports get generated every hour with the names "Report.Dddmmyy.Thhmiss.CTLR" "Report.Dddmmyy.Thhmiss.ACCD" "Report.Dddmmyy.Thhmiss.BCCD" "Report.Dddmmyy.Thhmiss.CCCD"... (1 Reply)
Discussion started by: Jesshelle David
1 Replies
wml::std::lang(3)						     EN Tools							 wml::std::lang(3)

NAME
wml::std::lang - Multi-Lingual Support SYNOPSIS
#use wml::std::lang <lang:new id=xx [short]> <lang:area> (xx) ... (yy) ... </lang:area> <lang:set-wildcard ...> <lang:star: ...*..> <lang:star:href: index.*.html|index.html> <lang:star:slice: index.*.html> <lang:xx>...</lang:xx> <lang:xx: ...> <xx>...</xx> <xx: ...> <lang:current> <lang:list> DESCRIPTION
This include file provides high-level multi-lingual support via Slices. Its purpose is to define the slices ``"LANG_XX"'' according to the multi-lingual selection tags. The general intend of this slice-based approach is to use the defined slices in Pass 9 (Slice) via WMLs -o option. A typical shebang-line example for the use with a webserver's content negotiation feature is: #!wml -o (ALL-LANG_*)+LANG_EN:index.html.en -o (ALL-LANG_*)+LANG_DE:index.html.de Since WML 1.7.0, the "<lang:star:slice:>" tag is an alternative to this shebang-line. Before you can use a language, you have to define the corresponding tags via "<lang:new>". For instance when you want to use the languages english and german, use: <lang:new id=en> <lang:new id=de> Then the following tags are defined: <lang:en>...</lang:en> <lang:de>...</lang:de> <lang:en: ...> <lang:de: ...> i.e. for both languages a container tag and a simple tag is defined. The container tag is more readable while the simple tag is nicer for short variants. When the names "lang:xx" are still to large for you, you can use the "short" attribute to "<lang:new>" <lang:new id=en short> <lang:new id=de short> when then leads to the defintion of the shortcut variants: <en>...</en> <de>...</de> <en: ...> <de: ...> Additionally you always have the "<lang:area>"..."</lang:area>" container tag available which provides an alternative way of selecting the language in its body. It automatically surrounds the data between `"(xx)"' start tags with the corresponding "LANG_XX" slice. The following are equal: <lang:xx: Foo><lang:yy Bar> <lang:xx>Foo</lang:xx><lang:yy>Bar</lang:yy> <lang:area>(xx)Foo(yy)Bar</lang:area> Because these three lines internally get expanded to [LANG_XX:Foo:][LANG_YY:Bar:] [LANG_XX:Foo:][LANG_YY:Bar:] [LANG_XX:Foo:][LANG_YY:Bar:] There is one additional special tag: "<lang:star:>". This tag expands its attribute line like the "<lang:xx:>" tags but multiple times. Actually as much as defined languages exists ("<lang:new>"!). And in each expansion the asterisks (=stars) in the data gets replaced by the language identifier. Is is sometimes convenient to use another wildcard, e.g. when defining navigation bars. The "<lang:set-wildcard>" tag does the job. The attribute becomes the wildcard used in future substitutions. Without attribute, the default value is restored. You may specify any regular expression, and do not forget to escape special characters (the astersisk is in fact ``\*''). <lang:set-wildcard "%"> <lang:star: index.%.html> <lang:set-wildcard> There is a more specialized variant named "<lang:star:href:>" which is similar to "<lang:star:>" but treats its attribute value as a URL part and tries to check if it already exists. If it doesn't exist the tag expands the value without the star or an alternative value which can be appended with ``|alt-value''. The "<lang:star:slice:>" is another variant to help writing multi-lingual files quickly. It must come after all occurences of "<lang:new>" tags. <lang:star:slice: index.html.*> The `%BASE' form is recognized (see wml(1)) and an empty argument is equivalent to the string `"%BASE.*.html"'. But note that the use of this tag instead of the WML shebang line prevents WMk from doing its job, because WMk can not guess output filenames in this case. For complex multi-lingual documents, you may want to know in which language text is currently processed. This is achieved with <lang:current> which always returns current language (as defined in "<lang:new>" or an empty string when outside of any language portion. The macro <lang:list> prints the newline separated list of defined languages. EXAMPLE
The following is an example of a webpage "index.wml" with a multi-lingual header and hyperlink: #use wml::std::lang #use wml::std::href <lang:new id=en short> <lang:new id=de short> <lang:star:slice: index.html.*> <h1><en: Welcome><de: Willkommen></h1> <href name="The Hyperlink" url="<lang:star: index.*.html>"> <href name="The Hyperlink" url="<lang:star:href: index2.*.html|index2.html>"> When processed via $ wml index.wml The following two output files are generated (assuming that index2.html and only index2.de.html exists): index.html.en: <h1>Welcome</h1> <a href="index.en.html">The Hyperlink</a> <a href="index2.html">The Hyperlink</a> index.html.de: <h1>Willkommen</h1> <a href="index.de.html">The Hyperlink</a> <a href="index2.de.html">The Hyperlink</a> AUTHOR
Ralf S. Engelschall rse@engelschall.com www.engelschall.com Denis Barbier barbier@engelschall.com REQUIRES
Internal: P1, P2, P6, P9 External: -- SEE ALSO
slice(1) EN Tools 2014-04-16 wml::std::lang(3)
All times are GMT -4. The time now is 04:48 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy