Sponsored Content
Full Discussion: how to sed in this case
Top Forums Shell Programming and Scripting how to sed in this case Post 302135911 by robotronic on Thursday 13th of September 2007 12:50:02 PM
Old 09-13-2007
Code:
echo "1:1:15" | awk -F: '{ printf("%02d:%02d:%02d\n", $1, $2, $3); }'

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

variables use upper case? sed : output to the same file?

Hi, Q1: are the variables in shell script usually UPPER CASE? Q2: can sed output to the same file that it's using it? eg. cat sameFile | sed 's/here/there/g' > sameFile ? I expect the sed replace all "here" to "there" and change it in sameFile. i tried that one, the sameFile... (1 Reply)
Discussion started by: gusla
1 Replies

2. UNIX for Dummies Questions & Answers

Sed - Lower case single characters

Hello, I have a file where I am supposed to convert all the single i characters to uppercase, but when I try, it converts all the i's inside of words to uppercase as well. I tried doing: cat filename | sed 's/i/I/g' but that obviously does not work. Any help would be greatly... (6 Replies)
Discussion started by: zlindner
6 Replies

3. UNIX for Dummies Questions & Answers

Case statement/sed command

The file dbnames.txt has 5 columns, what i'm trying to do is that when the fifth column equals A, store in the variable "access" the word, "admin access". If it equals B, then "business access" etc. I think their is a problem with my sed command, because it is not substibstituting the words... (1 Reply)
Discussion started by: ross_one
1 Replies

4. Shell Programming and Scripting

How to make sed case insensitive

I need to remove a pattern say, ABCD whether it is in uppercase or lowercase from a string. How to do it using SED? for example ABCDEF should output to EF abcdEF should also output to EF (2 Replies)
Discussion started by: vickylife
2 Replies

5. Shell Programming and Scripting

Ignoring case in sed search

I am getting a parameter from a user and I need to use it to search and return the matching line numbers in a file. I am using this code: recordNumber="$(sed -n '/'"$entry"'/{ = d }' unixdb1.txt)" where $entry is the passed search parameter. The problem is I need to ignore the case. ... (3 Replies)
Discussion started by: snag49ers
3 Replies

6. Shell Programming and Scripting

sed ignoring case for search but respecting case for subtitute

Hi I want to make string substitution ignoring case for search but respecting case for subtitute. Ex changing all occurences of "original" in a file to "substitute": original becomes substitute Origninal becomes Substitute ORIGINAL becomes SUBSTITUTE I know this a little special but it's not... (1 Reply)
Discussion started by: kmchen
1 Replies

7. UNIX for Dummies Questions & Answers

Using sed for case insensitive search

Hi, I have a file named "test_file" that has the below content. It has words in upper/lower cases PRODOPS prodOPS ProdOps PRODops escalate Shell My requirement is to replace all the "prodops" (what ever case it may be) with "productionoperations". I tried using the "i" option with... (7 Replies)
Discussion started by: sbhuvana20
7 Replies

8. Shell Programming and Scripting

making sed command case insensitive

i have something like this in a file cat onlytables.sql create table NextID ( id int auto_increment, zoneID int, entityName varchar(64), nextID int, lastModified TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, primary... (6 Replies)
Discussion started by: vivek d r
6 Replies

9. Shell Programming and Scripting

Awk-sed : Question getting case sensitive filed.

Experts, Good day!, I have following data, I want to filter 3rd Field, if it is in UPPERCASE, aa aa1 HOST1 aa bb1 host2 aa cc1 SERV1 aa dd1 SERV2 ab aa1 host3 The output should be: aa aa1 HOST1 aa cc1 SERV1 aa dd1 SERV2 (2 Replies)
Discussion started by: rveri
2 Replies

10. UNIX for Beginners Questions & Answers

Making SED case insensitive

Dears, In the below string, please let me know how to make the sed search case-incensitive. I have more such lines in my script instead of let me know any other easier option. sed -n '/dn: MSISDN=/,/^\s*$/p' full.ldif > temp ; sed -n... (4 Replies)
Discussion started by: Kamesh G
4 Replies
CPAN::Changes::Spec(3)					User Contributed Perl Documentation				    CPAN::Changes::Spec(3)

NAME
CPAN::Changes::Spec - Specification for CPAN Changes files VERSION
version 0.01 SYNOPSIS
Revision history for perl module Foo::Bar 0.02 2009-07-17 - Added more foo() tests 0.01 2009-07-16 - Initial release DESCRIPTION
This document describes version 0.1 of the specification for Changes files included in a CPAN distribution. It is intended as a guide for module authors to encourage them to write meaningful changelogs as well as provide a programmatic interface to reliably read and write Changes files. DATA TYPES
Version Versions should be formatted as described in "Version-Formats" in CPAN::Meta::Spec. Date A date/time in the format specified by <http://www.w3.org/TR/NOTE-datetime> aka W3CDTF. STRUCTURE
Required Elements In its simplest form, the only required elements are a version, a date and the noted changes. Blank lines between the "Version" line and the first "Change" line are optional. Blank lines between "Change" lines are also optional. <Version>(whitespace)<Date> (whitespace)<Change> "Change" lines have no specific format. Commonly, authors will use a dash "-" followed by a space to start a new change, and indent subsequent lines for multi-line changes. Example - Simple Change - This is a very very very long change line Preamble Any amount of text before the first "Version" line will be considered part of the preamble. Most existing distributions include something along the lines of: Revision history for perl module My::Module Groups Changelog entries may be grouped under headings. Heading lines begin with an opening square bracket ("["), and end with a matching square bracket ("]"). When parsing group headings, leading and trailing whitespace inside the brackets should be discarded. (whitespace)[Grouping Name] (whitespace)<Change> Since empty lines hold no special meaning, all "Change" lines will fall under the current group until a new group heading is found. Example: [ First Group ] - First Change - Second Change; in first group [ Second Group ] - First Change; in second group EXAMPLES
Basic Example 0.01 2009-07-16 - Initial release Example with a preamble Revision history for perl module Foo::Bar 0.02 2009-07-17 - Added more foo() tests 0.01 2009-07-16 - Initial release Example with groups Revision history for perl module Foo::Bar 0.03 2009-07-18 [Important Security Information] - This release fixes critical bug RT #1234 [Other Changes] - Added some feature 0.02 2009-07-17 - Added more foo() tests 0.01 2009-07-16T19:20:30+01:00 - Initial release SEE ALSO
o CPAN::Changes o Test::CPAN::Changes AUTHOR
Brian Cassidy <bricas@cpan.org> COPYRIGHT AND LICENSE
Copyright 2011-2012 by Brian Cassidy This is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.16.3 2012-04-30 CPAN::Changes::Spec(3)
All times are GMT -4. The time now is 11:51 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy