Sponsored Content
Full Discussion: Insert year in ls -l command
Top Forums UNIX for Beginners Questions & Answers Insert year in ls -l command Post 303042662 by kumarinfa on Thursday 2nd of January 2020 03:25:34 PM
Old 01-02-2020
@Ravindersingh13

Thank you for your suggestion, Yes i have save my output of ls command in file. and Can you please explain little bit in detail what we are doing in this solution.

Also what if my input is:
Code:
-rw-r--r-- 1 360 600 165923 Dec 31 11:29 12312019 file1_12312019_062449.csv

How can i extract year part in same solution, tried but could not get the expceted.

Thank you again
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

listing year in ls command

Hi all .. As per rule i searched the forum i am not able found out ... I want to display the year in when listing the files .. when i use ls -lt it is not displaying files with recent 6 month old .. I know that perderabo has written a script for that if you give that link it will be... (3 Replies)
Discussion started by: arunkumar_mca
3 Replies

2. Shell Programming and Scripting

Printing Year in ls -ltr command

Hi, When retrieving parameters of a file using ls command i need to print the year part . When i do ls -ltr the following output is displayed -rwxrwxrwx 1 d_infd d_infd 1711 Jan 8 2004 wf1.class. Here the year part is not displayed only Jan 8 is displayed. Can any one... (9 Replies)
Discussion started by: ragugct
9 Replies

3. Shell Programming and Scripting

Last Command not giving year

Hi All, i want the last login details along with year. i tried below command but not giving me the year of last login. last <$Userid> | head -1 i heard that if it is current year then it wont display the year else it will display the year. is it so? if yes then , is there any way of... (1 Reply)
Discussion started by: ani_rvce
1 Replies

4. UNIX for Dummies Questions & Answers

Last Command not giving year

Hi All, i want the last login details along with year. i tried below command but not giving me the year of last login. last <$Userid> | head -1 i heard that if it is current year then it wont display the year else it will display the year. is it so? if yes then , is there any way of... (1 Reply)
Discussion started by: ani_rvce
1 Replies

5. UNIX for Dummies Questions & Answers

sed insert command and variable expansion/command substitution

I know this script is crummy, but I was just messing around.. how do I get sed's insert command to allow variable expansion to show the filename? #!/bin/bash filename=`echo $0` /usr/bin/sed '/#include/ { i\ the filename is `$filename` }' $1 exit 0 (8 Replies)
Discussion started by: glev2005
8 Replies

6. Emergency UNIX and Linux Support

LAST command with Year

Hi Guys, I'm trying to identify the last logins by all the users in the system in AIX. the last command gives me the output, but there is no year displayed for it . Since there is a duplication of months i mean Apr 2010 and Apr 2009 also its giving me inaccurate data.. Is there a way I can filter... (4 Replies)
Discussion started by: kkeng808
4 Replies

7. UNIX for Advanced & Expert Users

unix command : how to insert text at the cursor location via command line?

Hi, Well my title isn't very clear I think. So to understand my goal: I have a script "test1" #!/bin/bash xvkbd -text blabla with xbindkeys, I bind F5 key in order it runs my test1 script So when I press F5, test1 runs. I'm under Emacs/Vi and I press F5 in order to have "blabla" be... (0 Replies)
Discussion started by: xib.be
0 Replies

8. Linux

uptime command output when the server is running more than one year?

What is the uptime command output when the server is running more than one year? My doubt is whether it show in number of days format or number years and number of days format? For example, Assume the server is running 400 days 3 hrs 3 min 3 secs. The output like 400 days 3:3 min or 1 year 5... (3 Replies)
Discussion started by: maruthu
3 Replies

9. UNIX for Dummies Questions & Answers

Unix man command to find out month of the year?

how can i display month of the year i was born with using man command? thanks (2 Replies)
Discussion started by: janetroop95
2 Replies

10. UNIX for Dummies Questions & Answers

Command to print previous year in UNIX

hi all, I use date +%Y which gives Current year. Requirement: I want previous year to be printed. Please help me. Note: I tried date +%d/%m/%Y -d "-1 years" which is not working. (10 Replies)
Discussion started by: wasim999
10 Replies
JODREPORTS(1)						      General Commands Manual						     JODREPORTS(1)

NAME
jodreports - use libjodreports-java directly from the command line to merge OpenDocument text with data SYNOPSIS
jodreports <template-document> <data-file> <output-document> DESCRIPTION
jodreports is a java program that merge OpenDocument text with data by using libjodreports-java. The command line tool is especially useful to test templates while you are adding instructions to them. You use a .properties or .xml file to contain the <data-file> to be merged into the template. The <template-document> needs to be an existing OpenDocument text with simple fields. A field that will be replaced with the value of a variable passed can be specified using the standard FreeMarker expression notation by typing the variable name into the doc- ument as follows Hi ${name}! here name will be replaced with the value passed in at runtime. However, mixing processing instructions and normal text into the document may become confusing and clutter the layout. So JOOReports pro- vides an alternative way of inserting fields. You can insert a visual field in OpenOffice.org Writer from the menu Insert / Fields / Other... (or just press Ctrl+F2), then click on the Functions tab and select Input field. Change the field Reference to JOOScript and in the following field Content enter the variable name (e.g. "$name"). This field will typically be displayed by Writer as a grayed rectangle with the variable name, while moving the mouse over it will reveal the field reference. This is a nice way of keeping processing instructions separate from the document layout and is thus the recommended approach. Whatever you specify as the field Reference will be treated as a FreeMarker ${...} expression, so it could also be something more complex than a simple variable name. To insert more advanced instructions, e.g. for conditionally displaying a portion of text, or repeating a table row for each item in a col- lection, you can use FreeMarker directives. A simple directive is assign. You can use it to define a new variable, for example [#assign totalPrice = unitPrice * quantity] Note that we always use the alternative (square bracket) syntax for FreeMarker directives. While it may be possible to insert this directive directly as text into the template, this does not always work (for reasons we'll see below) and as mentioned mixing instructions into the document is a practice we want to avoid anyway. For this reason, JOOReports lets you insert FreeMarker directives as scripts. You can insert a script in Writer from the menu Insert / Script..., then change the Script type to JOOScript and insert any FreeMarker directives in the script Text box. A script will be displayed by Writer as a small green rectangle, and you can double click on it to open it and modify it. So you directive will be executed at the point where the script has been inserted. This is ok for something like assign but as we'll see will not work for something like list. Alternatively, you can insert a FreeMarker directive in OpenOffice.org Writer from the menu Insert / Fields / Other... (or just press Ctrl+F2), then click on the Functions tab and select Input field. Change the field Reference to JOOScript and in the following field Con- tent enter the directive (e.g. "[#assign title='Mr.']"). Sample Open Document Template Again this provides a nice way to insert processing instructions and keept them separate from the document layout. The <output-document> is also an OpenDocument text and will be created as the result of the merge. JOOReports uses FreeMarker as its template engine. FILES
/usr/share/java/jodreports.jar AUTHOR
jodreports was written by Mirko Nasato <mirko@artofsolving.com> and Terry Liang <terry@polonious.com.au>. jodreports was packaged for the Debian project by Sascha Girrulat <sascha@girrulat.de>. This manual page was written by Sascha Girrulat <sascha@girrulat.de>, for the Debian project (and may be used by others). Most of the used information are reused from http://jodreports.sourceforge.net. User Manuals January 30, 2011 JODREPORTS(1)
All times are GMT -4. The time now is 03:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy