Sponsored Content
Full Discussion: convert/format a file
Top Forums Shell Programming and Scripting convert/format a file Post 302132700 by anumkoshy on Sunday 19th of August 2007 08:54:25 AM
Old 08-19-2007
CSV file
eg :-
20045667886,tamrind,user,india,address1234,love
20045667886,tamrind,user,india,address45,love
20045667886,tamrind,user,india,address333333,love
.
.
.50000records.

this is my input file , lets call it as filename.in

i would like to get a code snippet in shell script.

which can convert it to a fixedlength file which has a fixed layout
like

20045667886tamrinduserindiaaddress1234 love
20045667886tamrinduserindiaaddress45 love
20045667886tamrinduserindiaaddress333333love

ie each coloumn should have a fixed width.
Smilie
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to convert file format ?

Hi guys, I have a text file like in following format, IMSI:1 MSISDN:44569098 Data1=prov Data2=yes Data3=not Data4=yes Data5=yes Data6=yes IMSI:2 MSISDN:44569099 Data1=yes Data2=not Data3=prov Data4=prov (3 Replies)
Discussion started by: maheshsri
3 Replies

2. UNIX for Advanced & Expert Users

Convert UTF8 Format file to ANSI format

:) Hi i am trying to convert a file which is in UTF8 format to ANSI format i tried to use the function ICONV but it is throwing error Function i used it as $ iconv -f UTF8 -t ANSI filename Error iam getting is NOT Supported UTF8 to ANSI please some help me out on this.........Let me... (1 Reply)
Discussion started by: rajreddy
1 Replies

3. UNIX for Dummies Questions & Answers

Convert UTF8 Format file to ANSI format

:confused: Hi i am trying to convert a file which is in UTF8 format to ANSI format i tried to use the function ICONV but it is throwing error Function i used it as $ iconv -f UTF8 -t ANSI filename Error iam getting is NOT Supported UTF8 to ANSI please some help me out on... (9 Replies)
Discussion started by: rajreddy
9 Replies

4. UNIX for Dummies Questions & Answers

To convert multi format file to a readable ascii format

Hi I have a file which has ascii , binary, binary decimal coded,decimal & hexadecimal data with lot of special characters (like öƒ.ƒ.„İİ¡Š·œƒ.„İİ¡Š· ) in it. I want to standardize the file into ASCII format & later use that as source . Can any one suggest a way a logic to convert such... (5 Replies)
Discussion started by: gaur.deepti
5 Replies

5. Shell Programming and Scripting

Convert Epoch time format to normal date time format in the same file

I have a file named "suspected" with series of line like these : {'protocol': 17, 'service': 'BitTorrent KRPC', 'server': '219.78.120.166', 'client_port': 52044, 'client': '10.64.68.44', 'server_port': 8291, 'time': 1226506312L, 'serverhostname': ''} {'protocol': 17, 'service': 'BitTorrent... (3 Replies)
Discussion started by: rk4k
3 Replies

6. Shell Programming and Scripting

convert date format to mysql date format in log file

I have a comma delimited log file which has the date as MM/DD/YY in the 2nd column, and HH:MM:SS in the 3rd column. I need to change the date format to YYYY-MM-DD and merge it with the the time HH:MM:SS. How will I got about this? Sample input 02/27/09,23:52:31 02/27/09,23:52:52... (3 Replies)
Discussion started by: hazno
3 Replies

7. UNIX for Dummies Questions & Answers

Convert UNIX file format to PC format

Hi All, Is there any way to convert a file which is in UNIX format to a PC format.... Flip command can be used , apart form this command can we have any other way.... like usinf "awk" etc ..... main purpose of not using flip is that my Kshell doesnot support this comamnd.... (1 Reply)
Discussion started by: Samtel
1 Replies

8. Shell Programming and Scripting

Convert UNIX file format to PC format

Hi All, Is there any way to convert a file which is in UNIX format to a PC format.... Flip command can be used , apart form this command can we have any other way.... like usinf "awk" etc ..... main purpose of not using flip is that my Kshell doesnot support this comamnd.... (2 Replies)
Discussion started by: Samtel
2 Replies

9. Shell Programming and Scripting

Convert the below file to csv format

Hi , i want to change this question, i will post soon.. (6 Replies)
Discussion started by: srikanth2567
6 Replies

10. Shell Programming and Scripting

Need help Badly to convert file format!

Can anyone provide me a unix script to convert file formats. Input and desired output is attached. (10 Replies)
Discussion started by: Ravi S M
10 Replies
TOMOYO-INIT(8)						  System Administration Utilities					    TOMOYO-INIT(8)

NAME
tomoyo-init - load TOMOYO Linux policy automatically SYNOPSIS
tomoyo-init DESCRIPTION
When /sbin/init starts, the kernel automatically calls this program. Policy files that have been saved to disk are subsequently loaded into kernel memory. This program copies the following files: /etc/tomoyo/exception_policy.conf => /sys/kernel/security/tomoyo/exception_policy /etc/tomoyo/domain_policy.conf => /sys/kernel/security/tomoyo/domain_policy /etc/tomoyo/profile.conf => /sys/kernel/security/tomoyo/profile /etc/tomoyo/manager.conf => /sys/kernel/security/tomoyo/manager /etc/tomoyo/stat.conf => /sys/kernel/security/tomoyo/stat If /etc/tomoyo/tomoyo-post-init exists and is executable, then it will also be executed. This allows additional control over what happens at startup. You will not usually need to invoke this program manually. EXAMPLES
Contents of "/etc/tomoyo/tomoyo-post-init" allowing non-root "demo" user to edit policy #!/bin/bash echo manage_by_non_root > /sys/kernel/security/tomoyo/manager chown -R demo /sys/kernel/security/tomoyo BUGS
If you find any bugs, send an email to <tomoyo-users-en@lists.sourceforge.jp>. AUTHORS
Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> Main author. Jamie Nguyen <jamie@tomoyolinux.co.uk> Documentation and website. SEE ALSO
tomoyo-loadpolicy(8) See <http://tomoyo.sourceforge.jp> for more information. tomoyo-tools 2.5.0 2012-04-14 TOMOYO-INIT(8)
All times are GMT -4. The time now is 08:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy