Sponsored Content
Top Forums Shell Programming and Scripting Removing inserted newlines from a fileld of fixed width file. Post 302345590 by bakunin on Wednesday 19th of August 2009 03:59:59 PM
Old 08-19-2009
I might be wrong, but isn't this the very type of problems the "fmt" simple optimal formatter tool was created for?

"fmt -w <your desired line length here>" should do the trick.

I hope this helps.

bakunin
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Fixed Width file using AWK

I am using the following command at the Unix prompt to make my 'infile' into a fixed width file of 100 characters. awk '{printf "%-100s\n",$0}' infile > outfile However, there are some records with a special character "©" These records are using 3 characters in place of one and my record... (2 Replies)
Discussion started by: alok.benjwal
2 Replies

2. Shell Programming and Scripting

adding delimiter to a fixed width file

Hi , I have a file : CSCH74000.00 CSCH74000.00 CSCH74100.00 CSCH74000.00 CSCH74100.00 CSCH74000.00 CSCH74000.00 CSCH74100.00 CSCH74100.00 CSCH74100.00 I have to put a delimiter( say comma) in between after 6th character: CSCH74,000.00 CSCH74,000.00 CSCH74,100.00 (2 Replies)
Discussion started by: sumeet
2 Replies

3. Shell Programming and Scripting

Changing particular field in fixed width file

I have a fixed width file and i need to change 36th field to "G" in for about random 20 records? How can I do it? (4 Replies)
Discussion started by: dsravan
4 Replies

4. UNIX Desktop Questions & Answers

Help with Fixed width File Parsing

I am trying to parse a Fixed width file with data as below. I am trying to assign column values from each record to variables. When I parse the data, the spaces in all coumns are dropped. I would like to retain the spaces as part of the dat stored in the variables. Any help is appreciated. I... (4 Replies)
Discussion started by: sate911
4 Replies

5. Shell Programming and Scripting

Removing \n within a fixed width record

I am trying to remove a line feed (\n) within a fixed width record. I tried the tr -d ‘\n' command, but it also removes the record delimiter. Is there a way to remove the line feed without removing the record delimiter? (10 Replies)
Discussion started by: CKT_newbie88
10 Replies

6. Shell Programming and Scripting

Fixed-Width file from Oracle

Hi All, I have created a script which generates FIXED-WIDTH file by executing Oracle query. SELECT RPAD(NVL(col1,CHR(9)),20)||NVL(col2,CHR(9))||NVL(col3,CHR(9) FROM XYZ It generates the data file with proper alignment. But if same file i transfer to windows server or Mainframe... (5 Replies)
Discussion started by: Amit.Sagpariya
5 Replies

7. Shell Programming and Scripting

Comparing two fixed width file

Hi Guys I am checking the treads to get the answer but i am not able to get the answer for my question. I have two files. First file is a pattern file and the second file is the file i want to search in it. Output will be the lines from file2. File1: P2797f12af 44751228... (10 Replies)
Discussion started by: anshul_er
10 Replies

8. Shell Programming and Scripting

Removing duplicates in fixed width file which has multiple key columns

Hi All , I have a requirement where I need to remove duplicates from a fixed width file which has multiple key columns .Also , need to capture the duplicate records into another file . File has 8 columns. Key columns are col1 and col2. Col1 has the length of 8 col 2 has the length of 3. ... (5 Replies)
Discussion started by: saj
5 Replies

9. UNIX for Dummies Questions & Answers

Length of a fixed width file

I have a fixed width file of length 53. when is try to get the lengh of the record of that file i get 2 different answers. awk '{print length;exit}' <File_name> The above code gives me length 50. wc -L <File_name> The above code gives me length 53. Please clarify on... (2 Replies)
Discussion started by: Amrutha24
2 Replies

10. Shell Programming and Scripting

Alter Fixed Width File

Thank u so much .Its working fine as expected. ---------- Post updated at 03:41 PM ---------- Previous update was at 01:46 PM ---------- I need one more help. I have another file(fixed length) that will get negative value (ex:-00000000003000) in postion (98 - 112) then i have to... (6 Replies)
Discussion started by: vinus
6 Replies
DATEFMT_SET_TIMEZONE_ID(3)						 1						DATEFMT_SET_TIMEZONE_ID(3)

IntlDateFormatter::setTimeZoneId - Sets the time zone to use

	Object oriented style

SYNOPSIS
public bool IntlDateFormatter::setTimeZoneId (string $zone) DESCRIPTION
Procedural style bool datefmt_set_timezone_id (IntlDateFormatter $fmt, string $zone) Sets the time zone to use. Warning This function has been DEPRECATED as of PHP 5.5.0 and REMOVED as of PHP 7.0.0. PARAMETERS
o $fmt - The formatter resource. o $zone - The time zone ID string of the time zone to use. If NULL or the empty string, the default time zone for the runtime is used. RETURN VALUES
Returns TRUE on success or FALSE on failure. CHANGELOG
+--------+-------------------------------------+ |Version | | | | | | | Description | | | | +--------+-------------------------------------+ | 7.0.0 | | | | | | | This function has been removed. | | | | | 5.5.0 | | | | | | | This function has been deprecated. | | | | +--------+-------------------------------------+ EXAMPLES
Example #1 datefmt_set_timezone_id(3) example <?php $fmt = datefmt_create( 'en_US', IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'America/Los_Angeles', IntlDateFormatter::GREGORIAN ); echo 'timezone_id of the formatter is : ' . datefmt_get_timezone_id($fmt); datefmt_set_timezone_id($fmt, 'CN'); echo 'Now timezone_id of the formatter is : ' . datefmt_get_timezone_id($fmt); ?> Example #2 OO example <?php $fmt = new IntlDateFormatter( 'en_US', IntlDateFormatter::FULL, IntlDateFormatter::FULL, 'America/Los_Angeles', IntlDateFormatter::GREGORIAN ); echo 'timezone_id of the formatter is : ' . $fmt->getTimezoneId(); $fmt->setTimezoneId('CN'); echo 'Now timezone_id of the formatter is : ' . $fmt->getTimezoneId(); ?> The above example will output: timezone_id of the formatter is : America/Los_Angeles Now timezone_id of the formatter is : CN SEE ALSO
datefmt_get_timezone_id(3), datefmt_create(3). PHP Documentation Group DATEFMT_SET_TIMEZONE_ID(3)
All times are GMT -4. The time now is 11:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy