10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
(I am using bash)
I have a command that will find the line number in a file by searching for a string where it exists.
linenumber=$(grep -n "string" $FILENAME | cut -d : -fi)
This returns the line number and removes the string. Now that I have the line number I want to subtract 4 from it and... (5 Replies)
Discussion started by: prodigious8
5 Replies
2. UNIX for Dummies Questions & Answers
Hi, I'm trying to get multiple substitutions in one expression using sed:
echo "-foo-_-bar--foo-_bar_-_foo_bar_-foo_-_bar_-" | sed -e "s//-/g"
So, as you can see I'm trying to replace all instances of _-, -_, -- with - (dash)
I have provided bad example. The question is how to use multiple... (6 Replies)
Discussion started by: useretail
6 Replies
3. Shell Programming and Scripting
Hey everyone! I am determining the best method to do what the subject of this thread says. I only have pieces to the puzzle right now. Namely this:
grep -rl "expression" . | xargs open
(I should mention that the intention is to grep through many files containing the "expression" and... (2 Replies)
Discussion started by: Alexander4444
2 Replies
4. Shell Programming and Scripting
Dear all,
I have few log folders in directory (FILE) and i need to perform sed on each files inside each folders. Here is my script, and i wish to rename each file back to the same file name after modification. Can anyone guide me on my script below?
eg:
folder1 contain files... (2 Replies)
Discussion started by: ymeyaw
2 Replies
5. Shell Programming and Scripting
Hi,
I have a directory /home/datasets/ which contains a bunch (720) of subdirectories called hour_1/ hour_2/ etc..etc.. in each of these there is a single text file called (hour_1.txt in hour_1/ , hour_2.txt for hour_2/ etc..etc..) and i would like to do some text processing in them.
Each of... (20 Replies)
Discussion started by: amarn
20 Replies
6. Shell Programming and Scripting
Is there anyway to accomplish this?
(ksh)
FILES_TO_PROCESS='NAME1 NAME2'
SOURCE_NAME1=/tmp/myfile
TARGET_NAME1=/somewhere/else
# other file names
for i in $FILES_TO_PROCESS
do
file1=SOURCE_$i
file2=TARGET_$i
echo cp ${$file1} ${$file2} <-- how do get this to work.
done (2 Replies)
Discussion started by: koondog
2 Replies
7. Shell Programming and Scripting
Hi guys,
Is there any way this can be done, or return whether any substitutions have been made?
thanks for any input.
skinnygav (using Bash shell) (2 Replies)
Discussion started by: skinnygav
2 Replies
8. Shell Programming and Scripting
Hi:
Let's suppose I want to replace all the | by > ONLY when | is between . Usually (and it works) I would do something like
sed -e 's/\(\*\)|\(*\]\)/\1>\2/g'
where I have to "save" some portions of the matched region and use them with the \n metacharacter. I was wondering if I could... (2 Replies)
Discussion started by: islegmar
2 Replies
9. AIX
I have this Korn script that I wrote (with some help) that is run by cron. I basically watches a file system for a specific filename to be uploaded (via FTP), checks to make sure that the file is no longer being uploaded (by checking the files size), then runs a series of other scripts. The... (2 Replies)
Discussion started by: heprox
2 Replies
10. UNIX for Dummies Questions & Answers
How do I perform a command to multiple files? For example, I want to look at all files in a directory and print the ones that do not contain a certain string. How do I go about doing this? (4 Replies)
Discussion started by: mcgrawa
4 Replies
DateTime::Locale::tn_ZA(3) User Contributed Perl Documentation DateTime::Locale::tn_ZA(3)
NAME
DateTime::Locale::tn_ZA
SYNOPSIS
use DateTime;
my $dt = DateTime->now( locale => 'tn_ZA' );
print $dt->month_name();
DESCRIPTION
This is the DateTime locale package for Tswana South Africa.
DATA
This locale inherits from the DateTime::Locale::tn locale.
It contains the following data.
Days
Wide (format)
Mosopulogo
Labobedi
Laboraro
Labone
Labotlhano
Matlhatso
Tshipi
Abbreviated (format)
Mos
Bed
Rar
Ne
Tla
Mat
Tsh
Narrow (format)
2
3
4
5
6
7
1
Wide (stand-alone)
Mosopulogo
Labobedi
Laboraro
Labone
Labotlhano
Matlhatso
Tshipi
Abbreviated (stand-alone)
Mos
Bed
Rar
Ne
Tla
Mat
Tsh
Narrow (stand-alone)
2
3
4
5
6
7
1
Months
Wide (format)
Ferikgong
Tlhakole
Mopitlo
Moranang
Motsheganang
Seetebosigo
Phukwi
Phatwe
Lwetse
Diphalane
Ngwanatsele
Sedimonthole
Abbreviated (format)
Fer
Tlh
Mop
Mor
Mot
See
Phu
Pha
Lwe
Dip
Ngw
Sed
Narrow (format)
1
2
3
4
5
6
7
8
9
10
11
12
Wide (stand-alone)
Ferikgong
Tlhakole
Mopitlo
Moranang
Motsheganang
Seetebosigo
Phukwi
Phatwe
Lwetse
Diphalane
Ngwanatsele
Sedimonthole
Abbreviated (stand-alone)
Fer
Tlh
Mop
Mor
Mot
See
Phu
Pha
Lwe
Dip
Ngw
Sed
Narrow (stand-alone)
1
2
3
4
5
6
7
8
9
10
11
12
Quarters
Wide (format)
Q1
Q2
Q3
Q4
Abbreviated (format)
Q1
Q2
Q3
Q4
Narrow (format)
1
2
3
4
Wide (stand-alone)
Q1
Q2
Q3
Q4
Abbreviated (stand-alone)
Q1
Q2
Q3
Q4
Narrow (stand-alone)
1
2
3
4
Eras
Wide
BC
AD
Abbreviated
BC
AD
Narrow
BC
AD
Date Formats
Full
2008-02-05T18:30:30 = Labobedi, 2008 Tlhakole 05
1995-12-22T09:05:02 = Labotlhano, 1995 Sedimonthole 22
-0010-09-15T04:44:23 = Matlhatso, -10 Lwetse 15
Long
2008-02-05T18:30:30 = 2008 Tlhakole 5
1995-12-22T09:05:02 = 1995 Sedimonthole 22
-0010-09-15T04:44:23 = -10 Lwetse 15
Medium
2008-02-05T18:30:30 = 2008 Tlh 5
1995-12-22T09:05:02 = 1995 Sed 22
-0010-09-15T04:44:23 = -10 Lwe 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 Tlh 5
1995-12-22T09:05:02 = 1995 Sed 22
-0010-09-15T04:44:23 = -10 Lwe 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 = Labobedi, 2008 Tlhakole 05 18:30:30 UTC
1995-12-22T09:05:02 = Labotlhano, 1995 Sedimonthole 22 09:05:02 UTC
-0010-09-15T04:44:23 = Matlhatso, -10 Lwetse 15 04:44:23 UTC
Long
2008-02-05T18:30:30 = 2008 Tlhakole 5 18:30:30 UTC
1995-12-22T09:05:02 = 1995 Sedimonthole 22 09:05:02 UTC
-0010-09-15T04:44:23 = -10 Lwetse 15 04:44:23 UTC
Medium
2008-02-05T18:30:30 = 2008 Tlh 5 18:30:30
1995-12-22T09:05:02 = 1995 Sed 22 09:05:02
-0010-09-15T04:44:23 = -10 Lwe 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 Tlh 5 18:30:30
1995-12-22T09:05:02 = 1995 Sed 22 09:05:02
-0010-09-15T04:44:23 = -10 Lwe 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 Bed
1995-12-22T09:05:02 = 22 Tla
-0010-09-15T04:44:23 = 15 Mat
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 = Bed, 2-5
1995-12-22T09:05:02 = Tla, 12-22
-0010-09-15T04:44:23 = Mat, 9-15
MMM (LLL)
2008-02-05T18:30:30 = Tlh
1995-12-22T09:05:02 = Sed
-0010-09-15T04:44:23 = Lwe
MMMd (MMM d)
2008-02-05T18:30:30 = Tlh 5
1995-12-22T09:05:02 = Sed 22
-0010-09-15T04:44:23 = Lwe 15
MMMEd (E MMM d)
2008-02-05T18:30:30 = Bed Tlh 5
1995-12-22T09:05:02 = Tla Sed 22
-0010-09-15T04:44:23 = Mat Lwe 15
MMMMd (MMMM d)
2008-02-05T18:30:30 = Tlhakole 5
1995-12-22T09:05:02 = Sedimonthole 22
-0010-09-15T04:44:23 = Lwetse 15
MMMMEd (E MMMM d)
2008-02-05T18:30:30 = Bed Tlhakole 5
1995-12-22T09:05:02 = Tla Sedimonthole 22
-0010-09-15T04:44:23 = Mat Lwetse 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 = Bed, 2008-2-5
1995-12-22T09:05:02 = Tla, 1995-12-22
-0010-09-15T04:44:23 = Mat, -10-9-15
yMMM (y MMM)
2008-02-05T18:30:30 = 2008 Tlh
1995-12-22T09:05:02 = 1995 Sed
-0010-09-15T04:44:23 = -10 Lwe
yMMMEd (EEE, y MMM d)
2008-02-05T18:30:30 = Bed, 2008 Tlh 5
1995-12-22T09:05:02 = Tla, 1995 Sed 22
-0010-09-15T04:44:23 = Mat, -10 Lwe 15
yMMMM (y MMMM)
2008-02-05T18:30:30 = 2008 Tlhakole
1995-12-22T09:05:02 = 1995 Sedimonthole
-0010-09-15T04:44:23 = -10 Lwetse
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 Q1
1995-12-22T09:05:02 = 1995 Q4
-0010-09-15T04:44:23 = -10 Q3
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
Mosopulogo
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.18.2 2017-10-06 DateTime::Locale::tn_ZA(3)