07-23-2009
its working as expected thanks very much Jean-Pierre!!!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
I need to insert a line into a file underneath an existing line in the file, but am unsure as to the syntax. I'm pretty sure sed can be used though, although any ideas are more than welcome. For example:
File
----
Line 1
Line 2
Line 3
Line 4
Line 6
I need to say: Insert "Line 5"... (1 Reply)
Discussion started by: danhodges99
1 Replies
2. Shell Programming and Scripting
Hi,
I'm new to Awk/Sed programming.
I have a status file like this:
TYPE | FILE1 | Now Started
TYPE | FILE2 | Just Finished
TYPE | FILE3 | Now Started
TYPE | FILE4 | Just Finished
For a given FILE no, I need to change the "Now Started" condition to "Just Finished" in this file. The... (5 Replies)
Discussion started by: autouser123
5 Replies
3. UNIX for Dummies Questions & Answers
I am trying to retrieve part of a line from /boot/grub/menu.lst
The line is :
gfxmenu (hd0,0)/usr/share/gfxboot/themes/pclinuxblue/boot/message
I have figured out how to get this line into a file by itself.
sed '/gfxmenu/ !d' /boot/grub/menu.lst > /tmp/menu.lst.pcl_tc
What I need to... (2 Replies)
Discussion started by: Tide
2 Replies
4. Shell Programming and Scripting
Hello All,
Does anybody know how to extract the entries from the 1st and second column that match a multiple regex expression using either sed or awk?
I have a 40 k file with the data that looks like this.
2 VZudbEE.ds_HP11i-726..>
2 VZudbEEE.ds_IB-726-5..>
2... (1 Reply)
Discussion started by: liketheshell
1 Replies
5. Shell Programming and Scripting
Can someone please help me correctly frame the below sed command:
sed 's/.*/$(date +%Y%m%d)' filepattern
I have read a line of the file in filepattern variable which is like below:
P.182.MKT_DISC.*.2_1_1.*
I want to replace the last .* part with the current date in the format yyyymmdd.... (6 Replies)
Discussion started by: 100Rab
6 Replies
6. Shell Programming and Scripting
hi all,
for an example :
df -k output shows:
$ df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/cciss/c0d0p6 3099260 1117760 1824068 8% /
/dev/cciss/c0d0p1 256666 18065 225349 8% /boot
none 8219180 0 8219180 0% /dev/shm
/dev/mapper/vglocal-home
1032088 245172 734488 26%... (7 Replies)
Discussion started by: raghur77
7 Replies
7. Shell Programming and Scripting
Hi All,
p1=90;
if
then
echo "<font color=red>"
else
echo "<font color=green>"
fi
how to i do it in awk or sed scripting ? (4 Replies)
Discussion started by: raghur77
4 Replies
8. Shell Programming and Scripting
I am executing the following command:
sort file1.txt | uniq -c | sort -n > file2.txt
The problem is that in file 2, I get leading spaces, Like so:
1 N/A|A8MW11
8 N/A|ufwo1
9 N/A|a8mw11
10 900003|smoketest297688
10 N/A|a9dg4
10 danny|danni
12... (5 Replies)
Discussion started by: ddurden7
5 Replies
9. Shell Programming and Scripting
Hi,
I have some files being sent to me that have dates in them in this format:
from
1/8/2011 15:14:20
and I need the dates in this format (mysql date format)
To
2011-01-08 15:14:20
all I have so far is the regexp that detects the format:
sed -r -e 's@\1/\2/\3\4\5\6]::$@do... (7 Replies)
Discussion started by: Astrocloud
7 Replies
10. Shell Programming and Scripting
Hi I have a file that contains lines starting with a particular string plus a Colon: I need to output all these lines but only what comes after the colon
Can you pelase assist?
Example of lines in the file:
com.ubs.f35.cashequities/cashequities: 1 2
... (5 Replies)
Discussion started by: mnassiri
5 Replies
LEARN ABOUT CENTOS
date::calc::pp
Date::Calc::PP(3) User Contributed Perl Documentation Date::Calc::PP(3)
NAME
Date::Calc::PP - pure-Perl plug-in for Date::Calc
SYNOPSIS
You never use this module directly. Use Date::Calc(3) instead!
DESCRIPTION
You never use this module directly. Use Date::Calc(3) instead!
SEE ALSO
Date::Calc(3), Date::Calc::XS(3).
VERSION
This man page documents "Date::Calc::PP" version 6.3.
AUTHOR
Steffen Beyer
mailto:STBEY@cpan.org
http://www.engelschall.com/u/sb/download/
COPYRIGHT
Copyright (c) 1995 - 2009 by Steffen Beyer. All rights reserved.
LICENSE
This package is free software; you can use, modify and redistribute it under the same terms as Perl itself, i.e., at your option, under the
terms either of the "Artistic License" or the "GNU General Public License".
The C library at the core of the module "Date::Calc::XS" can, at your discretion, also be used, modified and redistributed under the terms
of the "GNU Library General Public License".
Please refer to the files "Artistic.txt", "GNU_GPL.txt" and "GNU_LGPL.txt" in the "license" subdirectory of this distribution for any
details!
DISCLAIMER
This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the "GNU General Public License" for more details.
perl v5.16.3 2009-10-31 Date::Calc::PP(3)