Sponsored Content
Full Discussion: Text Formating or Modifying
Top Forums Shell Programming and Scripting Text Formating or Modifying Post 302613227 by apatil65 on Tuesday 27th of March 2012 02:13:23 AM
Old 03-27-2012
Text Formating or Modifying

Hi Experts,

I have a text exactly like below in a file:
id item_id
item_date prin_mkt_val
--------------------------- ---------------------------
------------------------------- ------------------------
000448302 0000
May 31 2005 12:00AM 14,085,536

But I want the output as shown below:

id item_id item_date prin_mkt_val
000448302 0000 May 31 2005 12:00AM 14,085,536


Please help me in this using sed or awk or any.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

text formating/Text space padding

Hi, How do I format the following? I have a for loop that retrieves me the path and file name of a file. In column fashion I would like to add the time and another variable containing the file's size. This will result in all the time being under each other and all the file size's being under... (6 Replies)
Discussion started by: hugow
6 Replies

2. UNIX for Dummies Questions & Answers

Formating text from a script into a log file

Using a for loop I am able to get the following log file below. I would like o change the format a bit as is indicated lower down. I have looked at awk and sed but somehow is not getting any joy. I am a bit new to ksh scripting. Please assist. This is the format of my current log file after the... (1 Reply)
Discussion started by: hugow
1 Replies

3. Forum Support Area for Unregistered Users & Account Problems

Formating mailx text file for Lotus Notes users

We use AIX mailx or sendmail. How can I format a text file so that lotus notes users can see diferent fonts and highlighting. Or can a gif file (company logo..) be sent along with a text file and the Lotus notes user would see the logo and text displayed at the same time and not as an attachment? (0 Replies)
Discussion started by: lidoiwo
0 Replies

4. Shell Programming and Scripting

Help need in modifying the text of .txt file

Hi All, I've written a shell script in which i defined two varibles for example: str=1.0.0.15 timeStamp=2008.03.08 now using this varibles i need to modify a text file. The text content looks like this ************************ * packageNumber : 1.0.0.14 * * date :... (2 Replies)
Discussion started by: vinna
2 Replies

5. Shell Programming and Scripting

Inserting text and modifying the file

I am in a dire need of doing this job , please help from shell script or perl script. It will be highly appreciated. Please have a look at the following INPUT file; The first 14 rows are not of interest but I want them to be included in the output file as they are. From the row 14... (3 Replies)
Discussion started by: digipak
3 Replies

6. Shell Programming and Scripting

TEXT formating using script

Dear All I am facing problem while extracting data from below mention input file. My op should be like this.Required field display in red in file. Request you all to help. OP: RXOTX-46-5 1B4 RXOTX-46-4 2B5 INPUT FILE: <RXMFP:MO=RXOTX-46-5; RADIO X-CEIVER ADMINISTRATION... (4 Replies)
Discussion started by: jaydeep_sadaria
4 Replies

7. Shell Programming and Scripting

Text formating

Dear all I had input file as mention below and want op as mention. Kindly let me knw possible ways. Regards Jaydeep INPUT: RXOTX-48-1 2A 34 2B 35 RXOTX-499-2 2C 32 RXOTX-4-1 2D 23 OUTPUT: (3 Replies)
Discussion started by: jaydeep_sadaria
3 Replies

8. Shell Programming and Scripting

Text formating issue

Hi, I am trying to format the output of my script in a tabular format using the html code in my shell script. I am using html code for the first time in a shell script.I am trying to execute this script in Ksh but it is not getting executed. Can you please help me in figuring this out.... (6 Replies)
Discussion started by: isaacsam
6 Replies

9. Shell Programming and Scripting

Small query on modifying the text of file

Hi, I have file with the following text, /analysis2012/533/mc_S10_533/DYJets50/vgtree_1_1_33l.root /analysis2012/533/mc_S10_533/DYJets50/vgtree_2_5_33l.root /analysis2012/533/mc_S10_533/DYJets50/vgtree_6_7_33l.root and many such files. For some operation on these files, I would like... (9 Replies)
Discussion started by: emily
9 Replies

10. UNIX for Beginners Questions & Answers

Modifying/combining two text outputs

greetings, I have what seems to be a fairly complex task at hand. I am dealing with 3 outputs from a database. a) Listing of tables. The first 3 characters are always an identifier of an application. See in part b - Example- select tablename from system.tables ABC1 ABC2 RFV1 ... (2 Replies)
Discussion started by: jeffs42885
2 Replies
DATETIME(3)								 1							       DATETIME(3)

The DateTime class

INTRODUCTION
Representation of date and time. CLASS SYNOPSIS
DateTime DateTimeDateTimeInterface Constants o const string$DateTime::ATOM"Y-m-dTH:i:sP" o const string$DateTime::COOKIE"l, d-M-Y H:i:s T" o const string$DateTime::ISO8601"Y-m-dTH:i:sO" o const string$DateTime::RFC822"D, d M y H:i:s O" o const string$DateTime::RFC850"l, d-M-y H:i:s T" o const string$DateTime::RFC1036"D, d M y H:i:s O" o const string$DateTime::RFC1123"D, d M Y H:i:s O" o const string$DateTime::RFC2822"D, d M Y H:i:s O" o const string$DateTime::RFC3339"Y-m-dTH:i:sP" o const string$DateTime::RSS"D, d M Y H:i:s O" o const string$DateTime::W3C"Y-m-dTH:i:sP" Methods o public DateTime::__construct NULL ([string $time = "now"], [DateTimeZone $timezone]) o public DateTime DateTime::add (DateInterval $interval) o publicstatic DateTime DateTime::createFromFormat (string $format, string $time, [DateTimeZone $timezone]) o publicstatic array DateTime::getLastErrors (void ) o public DateTime DateTime::modify (string $modify) o publicstatic DateTime DateTime::__set_state (array $array) o public DateTime DateTime::setDate (int $year, int $month, int $day) o public DateTime DateTime::setISODate (int $year, int $week, [int $day = 1]) o public DateTime DateTime::setTime (int $hour, int $minute, [int $second]) o public DateTime DateTime::setTimestamp (int $unixtimestamp) o public DateTime DateTime::setTimezone (DateTimeZone $timezone) o public DateTime DateTime::sub (DateInterval $interval) o public DateInterval DateTime::diff (DateTimeInterface $datetime2, [bool $absolute = false]) o public string DateTime::format (string $format) o public int DateTime::getOffset (void ) o public int DateTime::getTimestamp (void ) o public DateTimeZone DateTime::getTimezone (void ) o public DateTime::__wakeup (void ) PREDEFINED CONSTANTS
o DateTime::ATOM - DATE_ATOM - Atom (example: 2005-08-15T15:52:01+00:00) o DateTime::COOKIE - DATE_COOKIE - HTTP Cookies (example: Monday, 15-Aug-2005 15:52:01 UTC) o DateTime::ISO8601 - DATE_ISO8601 - ISO-8601 (example: 2005-08-15T15:52:01+0000) o DateTime::RFC822 - DATE_RFC822 - RFC 822 (example: Mon, 15 Aug 05 15:52:01 +0000) o DateTime::RFC850 - DATE_RFC850 - RFC 850 (example: Monday, 15-Aug-05 15:52:01 UTC) o DateTime::RFC1036 - DATE_RFC1036 - RFC 1036 (example: Mon, 15 Aug 05 15:52:01 +0000) o DateTime::RFC1123 - DATE_RFC1123 - RFC 1123 (example: Mon, 15 Aug 2005 15:52:01 +0000) o DateTime::RFC2822 - DATE_RFC2822 - RFC 2822 (example: Mon, 15 Aug 2005 15:52:01 +0000) o DateTime::RFC3339 - DATE_RFC3339 - Same as DATE_ATOM (since PHP 5.1.3) o DateTime::RSS - DATE_RSS - RSS (example: Mon, 15 Aug 2005 15:52:01 +0000) o DateTime::W3C - DATE_W3C - World Wide Web Consortium (example: 2005-08-15T15:52:01+00:00) CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 5.5.0 | | | | | | | The class now implements DateTimeInterface. | | | | |5.4.24 | | | | | | | The COOKIE constant was changed to reflect RFC | | | 1036 using a four digit year rather than a two | | | digit year (RFC 850) as prior versions. | | | | | 5.2.2 | | | | | | | DateTime object comparison with the comparison | | | operators changed to work as expected. Previ- | | | ously, all DateTime objects were considered equal | | | (using ==). | | | | +--------+---------------------------------------------------+ PHP Documentation Group DATETIME(3)
All times are GMT -4. The time now is 08:02 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy