Sponsored Content
Full Discussion: Display file name
Homework and Emergencies Homework & Coursework Questions Display file name Post 302566432 by galanom on Thursday 20th of October 2011 10:47:07 AM
Old 10-20-2011
I guess
Code:
cat Jan Feb Mar Apr Mar Jun Jul

is out of question, right? Smilie

Well, why don't you create an environmental variable with the contents "Jan Feb ... Dec". That will make your life much easier.
Then you can play with "cut" command. You can set the field range of 1-6, be sure to define the delimiter to space (quote it) and if you need the contents of the files, backquote them to a cat command.

That's fast and dirty.

If you need something more elaborate, consider using an interpreted language that supports hash tables (dictionaries) like perl or python.
Something like
{'Jan':1, 'Feb':2, ... 'Dec':12 }
And sort it by value.

Hope that helps.
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Display File

I have a file xx like this abc abcd abc abcd abcd efgh ijkl mnop qrst uv wxyz Now I want to search for "abcd". After the last found, it will display the remaining of the file. So here I am expecting something like abcd efgh ijkl mnop qrst uv wxyz (2 Replies)
Discussion started by: joy_deep
2 Replies

2. Shell Programming and Scripting

Display File

I have a file xx like this abc abcd abc abcd abcd efgh ijkl mnop qrst uv wxyz Now I want to search for "abcd". After the last found, it will display the remaining of the file. So here I am expecting something like abcd efgh ijkl mnop qrst uv wxyz (5 Replies)
Discussion started by: joy_deep
5 Replies

3. Programming

Display file

I am making a program in c. I want the progrm to be able to display file names ( like in unix we do long lisiting) what should i do? Any help will be appreciated (3 Replies)
Discussion started by: programlover
3 Replies

4. Shell Programming and Scripting

Grep pattern from different file and display if it exists in the required file

Hi, I have two files say xxx.txt and yyy.txt. xxx.txt is with list of patterns within double quotes. Eg. "this is the line1" "this is the line2" The yyy.txt with lot of lines. eg: "This is a test message which contains rubbish information just to fill the page which is of no use. this is... (3 Replies)
Discussion started by: abinash
3 Replies

5. Shell Programming and Scripting

Grep a pattern given in one file at other file and display its corresponding contents as output.

***************************************** Right now i have this current system. I have two files say xxx.txt and yyy.txt. xxx.txt is with list of patterns within double quotes. Eg. "this is the line1" "this is the line2" The yyy.txt with lot of lines. eg: "This is a test message which... (7 Replies)
Discussion started by: abinash
7 Replies

6. Shell Programming and Scripting

adding rows of a file and display in another file

How to add these all ( 1 1 0 1 1 0 1 0 0 0 1 5 8 0 12 10 25) in the script and How to calculate the GPA?? :wall: For example a course record file can be like this: COURSE NAME: Operating Systems CREDITS: 4 123456 1 1 0 1 1 0 1 0 0 0 1 5 8 0 12 10 25 243567 0 1 1 0 1 1 0 1 0 0 0 7 9 12 15 17 15... (1 Reply)
Discussion started by: poonam29
1 Replies

7. Homework & Coursework Questions

adding rows of a file and display in another file

How to add these all ( 1 1 0 1 1 0 1 0 0 0 1 5 8 0 12 10 25) in the script and How to calculate the GPA?? :wall: For example a course record file can be like this: COURSE NAME: Operating Systems CREDITS: 4 123456 1 1 0 1 1 0 1 0 0 0 1 5 8 0 12 10 25 243567 0 1 1 0 1 1 0 1 0 0 0 7 9 12 15 17 15... (1 Reply)
Discussion started by: poonam29
1 Replies

8. Shell Programming and Scripting

File Name needs to display

I am new to shell scripting plz help me to get solution for below requirement - If name.sh file is present, message will be displayed as “name.sh is present” else "name.sh is not present" I have tested below script but getting error. #!/bin/ksh file_found=`ls name.sh` found=`echo $?` if... (6 Replies)
Discussion started by: rahulbahulekar
6 Replies

9. Shell Programming and Scripting

Display file date after grepping a string in the file

Hi All, I need to recursively grep several folders for a MAC address and display the results with the date of the file name at the start. Even better would be if the final results were displayed chronologically so the newest file is always at the end. Oldest at the top, regardless of what... (8 Replies)
Discussion started by: quemalr
8 Replies
DateTime::Locale::bs_BA(3)				User Contributed Perl Documentation				DateTime::Locale::bs_BA(3)

NAME
DateTime::Locale::bs_BA SYNOPSIS
use DateTime; my $dt = DateTime->now( locale => 'bs_BA' ); print $dt->month_name(); DESCRIPTION
This is the DateTime locale package for Bosnian Bosnia and Herzegovina. DATA
This locale inherits from the DateTime::Locale::bs locale. It contains the following data. Days Wide (format) Ponedjeljak Utorak Srijeda Xetvrtak Petak Subota Nedjelja Abbreviated (format) Pon Uto Sri Xet Pet Sub Ned Narrow (format) 2 3 4 5 6 7 1 Wide (stand-alone) Ponedjeljak Utorak Srijeda Xetvrtak Petak Subota Nedjelja Abbreviated (stand-alone) Pon Uto Sri Xet Pet Sub Ned Narrow (stand-alone) 2 3 4 5 6 7 1 Months Wide (format) Januar Februar Mart April Maj Juni Juli Avgust Septembar Oktobar Novembar Decembar Abbreviated (format) Jan Feb Mar Apr Maj Jun Jul Avg Sep Okt Nov Dec Narrow (format) 1 2 3 4 5 6 7 8 9 10 11 12 Wide (stand-alone) Januar Februar Mart April Maj Juni Juli Avgust Septembar Oktobar Novembar Decembar Abbreviated (stand-alone) Jan Feb Mar Apr Maj Jun Jul Avg Sep Okt Nov Dec Narrow (stand-alone) 1 2 3 4 5 6 7 8 9 10 11 12 Quarters Wide (format) Prvi kvartal Drugi kvartal TreXi kvartal Xetvrti kvartal Abbreviated (format) K1 K2 K3 K4 Narrow (format) 1 2 3 4 Wide (stand-alone) Prvi kvartal Drugi kvartal TreXi kvartal Xetvrti kvartal Abbreviated (stand-alone) K1 K2 K3 K4 Narrow (stand-alone) 1 2 3 4 Eras Wide BCE CE Abbreviated BC AD Narrow BC AD Date Formats Full 2008-02-05T18:30:30 = Utorak, 2008 Februar 05 1995-12-22T09:05:02 = Petak, 1995 Decembar 22 -0010-09-15T04:44:23 = Subota, -10 Septembar 15 Long 2008-02-05T18:30:30 = 2008 Februar 5 1995-12-22T09:05:02 = 1995 Decembar 22 -0010-09-15T04:44:23 = -10 Septembar 15 Medium 2008-02-05T18:30:30 = 2008 Feb 5 1995-12-22T09:05:02 = 1995 Dec 22 -0010-09-15T04:44:23 = -10 Sep 15 Short 2008-02-05T18:30:30 = 08/02/05 1995-12-22T09:05:02 = 95/12/22 -0010-09-15T04:44:23 = -10/09/15 Default 2008-02-05T18:30:30 = 2008 Feb 5 1995-12-22T09:05:02 = 1995 Dec 22 -0010-09-15T04:44:23 = -10 Sep 15 Time Formats Full 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC Long 2008-02-05T18:30:30 = 18:30:30 UTC 1995-12-22T09:05:02 = 09:05:02 UTC -0010-09-15T04:44:23 = 04:44:23 UTC Medium 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Short 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 09:05 -0010-09-15T04:44:23 = 04:44 Default 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 09:05:02 -0010-09-15T04:44:23 = 04:44:23 Datetime Formats Full 2008-02-05T18:30:30 = Utorak, 2008 Februar 05 18:30:30 UTC 1995-12-22T09:05:02 = Petak, 1995 Decembar 22 09:05:02 UTC -0010-09-15T04:44:23 = Subota, -10 Septembar 15 04:44:23 UTC Long 2008-02-05T18:30:30 = 2008 Februar 5 18:30:30 UTC 1995-12-22T09:05:02 = 1995 Decembar 22 09:05:02 UTC -0010-09-15T04:44:23 = -10 Septembar 15 04:44:23 UTC Medium 2008-02-05T18:30:30 = 2008 Feb 5 18:30:30 1995-12-22T09:05:02 = 1995 Dec 22 09:05:02 -0010-09-15T04:44:23 = -10 Sep 15 04:44:23 Short 2008-02-05T18:30:30 = 08/02/05 18:30 1995-12-22T09:05:02 = 95/12/22 09:05 -0010-09-15T04:44:23 = -10/09/15 04:44 Default 2008-02-05T18:30:30 = 2008 Feb 5 18:30:30 1995-12-22T09:05:02 = 1995 Dec 22 09:05:02 -0010-09-15T04:44:23 = -10 Sep 15 04:44:23 Available Formats d (d) 2008-02-05T18:30:30 = 5 1995-12-22T09:05:02 = 22 -0010-09-15T04:44:23 = 15 EEEd (d EEE) 2008-02-05T18:30:30 = 5 Uto 1995-12-22T09:05:02 = 22 Pet -0010-09-15T04:44:23 = 15 Sub Hm (H:mm) 2008-02-05T18:30:30 = 18:30 1995-12-22T09:05:02 = 9:05 -0010-09-15T04:44:23 = 4:44 hm (h:mm a) 2008-02-05T18:30:30 = 6:30 PM 1995-12-22T09:05:02 = 9:05 AM -0010-09-15T04:44:23 = 4:44 AM Hms (H:mm:ss) 2008-02-05T18:30:30 = 18:30:30 1995-12-22T09:05:02 = 9:05:02 -0010-09-15T04:44:23 = 4:44:23 hms (h:mm:ss a) 2008-02-05T18:30:30 = 6:30:30 PM 1995-12-22T09:05:02 = 9:05:02 AM -0010-09-15T04:44:23 = 4:44:23 AM M (L) 2008-02-05T18:30:30 = 2 1995-12-22T09:05:02 = 12 -0010-09-15T04:44:23 = 9 Md (M-d) 2008-02-05T18:30:30 = 2-5 1995-12-22T09:05:02 = 12-22 -0010-09-15T04:44:23 = 9-15 MEd (E, M-d) 2008-02-05T18:30:30 = Uto, 2-5 1995-12-22T09:05:02 = Pet, 12-22 -0010-09-15T04:44:23 = Sub, 9-15 MMM (LLL) 2008-02-05T18:30:30 = Feb 1995-12-22T09:05:02 = Dec -0010-09-15T04:44:23 = Sep MMMd (MMM d) 2008-02-05T18:30:30 = Feb 5 1995-12-22T09:05:02 = Dec 22 -0010-09-15T04:44:23 = Sep 15 MMMEd (E MMM d) 2008-02-05T18:30:30 = Uto Feb 5 1995-12-22T09:05:02 = Pet Dec 22 -0010-09-15T04:44:23 = Sub Sep 15 MMMMd (MMMM d) 2008-02-05T18:30:30 = Februar 5 1995-12-22T09:05:02 = Decembar 22 -0010-09-15T04:44:23 = Septembar 15 MMMMEd (E MMMM d) 2008-02-05T18:30:30 = Uto Februar 5 1995-12-22T09:05:02 = Pet Decembar 22 -0010-09-15T04:44:23 = Sub Septembar 15 ms (mm:ss) 2008-02-05T18:30:30 = 30:30 1995-12-22T09:05:02 = 05:02 -0010-09-15T04:44:23 = 44:23 y (y) 2008-02-05T18:30:30 = 2008 1995-12-22T09:05:02 = 1995 -0010-09-15T04:44:23 = -10 yM (y-M) 2008-02-05T18:30:30 = 2008-2 1995-12-22T09:05:02 = 1995-12 -0010-09-15T04:44:23 = -10-9 yMEd (EEE, y-M-d) 2008-02-05T18:30:30 = Uto, 2008-2-5 1995-12-22T09:05:02 = Pet, 1995-12-22 -0010-09-15T04:44:23 = Sub, -10-9-15 yMMM (y MMM) 2008-02-05T18:30:30 = 2008 Feb 1995-12-22T09:05:02 = 1995 Dec -0010-09-15T04:44:23 = -10 Sep yMMMEd (EEE, y MMM d) 2008-02-05T18:30:30 = Uto, 2008 Feb 5 1995-12-22T09:05:02 = Pet, 1995 Dec 22 -0010-09-15T04:44:23 = Sub, -10 Sep 15 yMMMM (y MMMM) 2008-02-05T18:30:30 = 2008 Februar 1995-12-22T09:05:02 = 1995 Decembar -0010-09-15T04:44:23 = -10 Septembar yQ (y Q) 2008-02-05T18:30:30 = 2008 1 1995-12-22T09:05:02 = 1995 4 -0010-09-15T04:44:23 = -10 3 yQQQ (y QQQ) 2008-02-05T18:30:30 = 2008 K1 1995-12-22T09:05:02 = 1995 K4 -0010-09-15T04:44:23 = -10 K3 yyQ (Q yy) 2008-02-05T18:30:30 = 1 08 1995-12-22T09:05:02 = 4 95 -0010-09-15T04:44:23 = 3 -10 Miscellaneous Prefers 24 hour time? Yes Local first day of the week Ponedjeljak SUPPORT
See DateTime::Locale. AUTHOR
Dave Rolsky <autarch@urth.org> COPYRIGHT
Copyright (c) 2008 David Rolsky. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. This module was generated from data provided by the CLDR project, see the LICENSE.cldr in this distribution for details on the CLDR data's license. perl v5.16.3 2014-06-10 DateTime::Locale::bs_BA(3)
All times are GMT -4. The time now is 03:21 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy