Hello,
I have 2 files say
File 1 has
ABC
DEF
GHI
File 2 has
123
456
789
I need output as
ABC 123
DEF 456
GHI 789
I tried awk and sed but not able to get it in the right way. :confused:
Please help. Thanks (25 Replies)
Hi,
Please provide shell script to Remove empty lines(space) between two lines containing strings in a file.
Input File :
A1/EXT "BAP_BSC6/07B/00" 844 090602 1605
RXOCF-465 PDTR11 1
SITE ON BATTERY
A2/EXT... (3 Replies)
Hi ,
I want to join two lines in a file, where the second line contain query string. if it doesn't contain that string i don't want to join
e.g.
Input file is as following:
name fame game
none none none
name fame game
cat eat mice
I need output file as
name fame game
none none... (2 Replies)
Hi All,
I need the command to join 2 lines into one. I found lots of threads but none give me the sollution. Probably because unix scripting is one of my best features ;)
I got a logfile where line 2 needs to be joined with line 1, lines 4 needs to be joined with line 3 etc
If you need... (16 Replies)
Hi Guys,
Was trying to attempt the below using awk and sed, have no luck so far, so any help would be appreciated.
Current Text File: The first line has got an "\n", and the second line has got spaces/tabs then the word and "\n"
TIME SERVER/CLIENT TEXT... (6 Replies)
I have a plain test file with a delimeter ''. In this file some lines are broken into two. The first part of these broken line will have 6 columns and the second part will have 4. These broken lines will be consicutive.
I want to join the two consicutive lines which are having 6 fields and 4... (8 Replies)
I'm trying to remove all of the empty lines at the end of a Tab delimited file. They have no data just tabs.
I've tried may things, here are a couple:
sed /^\t.\t/d File1 > File2
sed /^\t{44}/d File1 > File2
What am I missing? (9 Replies)
Hi,
I have a huge file with sql broken statements like:
PP3697HB @@@@0
<<<<<<Record has been deleted as per PP3697HB>>>>>>
FROM sys.xtab_ref rc,sys.xtab_sys f,sys.domp ur WHE
RE rc.milf = ur.milf AND rc.molf = f.molf AND ur.dept = 'SWIT'AND ur
.department = 'IND' AND share = '2' AND... (4 Replies)
Hi all,
I'm excited to the part of unix.com forum, and noob to it.
I have an query, where I have an file and it contains data like this
use
thread
when
posting
do
no
I was expecting the result as
use thread
thread when
when posting
posting do
do no
use thread when
thread when... (6 Replies)
Hi to everybody.
I have a "2n" lines file. I would like to create a
new file with only "n" lines, each line in the new
file formed by the proper odd line of the old file
joined with the following even line (separated by
a space) of the old file. I'd prefer using sed or
bash.
-example-... (5 Replies)
Discussion started by: felino
5 Replies
LEARN ABOUT DEBIAN
date::hijri
Hijri(3pm) User Contributed Perl Documentation Hijri(3pm)NAME
Date::Hijri - Perl extension to convert islamic (hijri) and gregorian dates.
SYNOPSIS
use Date::Hijri;
# convert gregorian to hijri date
my ($hd, $hm, $hy) = g2h($gd, $gm, $gy);
# convert hijri to gregorian date
my ($gd, $gm, $gy) = h2g($hd, $hm, $hy);
DESCRIPTION
This simple module converts gregorian dates to islamic (hijri) and vice versa.
The dates must be given as an array containing the day, month and year, and return the corresponding date as a list with the same elements.
EXAMPLES
#!/usr/bin/perl -w
use Date::Hijri;
print join("-", g2h(22,8,2003)); # prints 23-6-1424
print join("-", h2g(23,6,1424)); # prints 22-8-2003
SEE ALSO
This code is just stolen from KDE's kcalendarsystemhijri.cpp at
http://webcvs.kde.org/cgi-bin/cvsweb.cgi/kdelibs/kdecore/kcalendarsystemhijri.cpp
Copyright (c) 2002-2003 Carlos Moro <cfmoro@correo.uniovi.es>
Copyright (c) 2002-2003 Hans Petter Bieker <bieker@kde.org>
kcalendarsystemhijri.cpp is translated from the Lisp code
in ``Calendrical Calculations'' by Nachum Dershowitz and
Edward M. Reingold, Software---Practice & Experience,
vol. 20, no. 9 (September, 1990), pp. 899--928.
This code is in the public domain, but any use of it
should publically acknowledge its source.
AUTHOR
Alex Pleiner, <alex@zeitform.de>
COPYRIGHT AND LICENSE
Copyright (c) 2003 zeitform Internet Dienste. All rights reserved. This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
DISCLAIMER
I haven't really tested if the converted dates are right and hope someone will point out mistakes.
Hijri calculations are very difficult. The islamic calendar is a pure lunar calendar, the new month starts by a physical (i.e. human)
sighting of the crescent moon at a given locale. So it depends on several factors (like weather) that make it unreliable to calculate
islamic calendars in advance. As a result the dates calculated by Date::Hijri can be false by one or more days.
Please see http://www.rabiah.com/convert/introduction.html for further explanation.
I'm not a muslim, but interested in Islamic culture, religion and calendar system. I believe in the Internet as a chance to realize that we
live in a small world with multiple cultures, religions and philosophies. We can learn from others and develop tolerance, respect and
understanding.
Salam Alaikum (peace be with you)
perl v5.10.0 2003-08-26 Hijri(3pm)