Need help to format one txt file to required format
Hello Everyone,
I have one source file which is genarated by SAP in different format(Which I've never seen). I need to convert that file to required format and I need to read this target file from Datastage to use this in my Jobs. So I do not have any other options except to use Unix script to modify this file. I am not that expert in Unix so I would like to take Ideas from all of you, it may help us to complete this task.
I am attaching my source file to this thread and below is my required output format.
Can anyone please let me know is it possible to do this through Unix or not?
Hi all,
i have a file toto.txt :
blabla;toumtoudoum;blablabla
toumtoudoumtoudoum;blabla;popopopo
blablabla;etcetcetc;blabla
etc....
As you can see, it is a simple file containig 3 fields separated by a ";".
What i want to do is to display this file with a nice formating... (4 Replies)
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)
HI guys,
I have created a script to read 1 column in a csv file and then place it in text file.
However, when i checked out the text file, it is not in a column format...
Example:
CSV file contains
name,age
aa,11
bb,22
cc,33
After using awk to get first column
TXT file... (1 Reply)
I have some files created in Excel that have to be saved as .txt files in order to load them into our accounting system. I can save the files as .txt files through Excel, but I then have to open them in TextPad and do a save as to change the Format from PC to UNIX. Is there a way to skip this step... (2 Replies)
Hi All,
I have a file with content
FLIGHT PLANS PRODUCED ON 26.08.2008(SORTED BY FPLAN NUMBER) RUN DATED 27/08/08 PAGE 1
--------------------------------------------------------------
FPLAN FPLAN PRE BTCH BATCH POST BTCH BATCH BATCH ... (1 Reply)
I have a short time to solve a problem, so I need some help. I've searched the forum, but I couldn't find a solution to my problem.
I made a script to filter some text and now I have a new requirement to make it available as html table. Problem is that I more than one files with different set... (2 Replies)
Hi,
I am having couple of files which i used to copy from windows to Linux, so now in case of text files (CTRL^M) appears at end of line. I know i can convert this windows format file to unix format file by running dos2unix.
My requirement here is that i want to do it automatically using a... (5 Replies)
Hello All,
I have File_all.txt which have content as below
Volume in drive E is Data
Volume Serial Number is 586D-6932
Directory of E:\mydi2\siudfor\TFG058
03/27/2014 09:59 PM 5,569 FX\FX01 my4_pg4_MON_20140327_C.zip
1 File(s) 5,569 bytes
... (5 Replies)
My file format:
--------------------------------------------------
Complete Consistency Check
Valid Area : VALID:VALID
Started by : esanwad
Started at : Thu Dec 11 16:04:46 2014
CNA version : R21H04_EC08
Check range : AREA VALID/VALID
... (4 Replies)
I have a text file with contents like this:
a,b,c,
d~e,f,g,h~i,j
,k,l,m~n,o,p,q~
I need to convert this file into this format unix shell script commands:
a,b,c,d~
e,f,g,h~
i,j,k,l,m~
n,o,p,q~
as you may have noticed, I need to retain the ~ signs at the end.
Any help is greatly... (3 Replies)
Discussion started by: harsha1238
3 Replies
LEARN ABOUT POSIX
cal
CAL(1P) POSIX Programmer's Manual CAL(1P)PROLOG
This manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (consult the correspond-
ing Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux.
NAME
cal -- print a calendar
SYNOPSIS
cal [[month] year]
DESCRIPTION
The cal utility shall write a calendar to standard output using the Julian calendar for dates from January 1, 1 through September 2, 1752
and the Gregorian calendar for dates from September 14, 1752 through December 31, 9999 as though the Gregorian calendar had been adopted on
September 14, 1752.
If no operands are given, cal shall produce a one-month calendar for the current month in the current year. If only the year operand is
given, cal shall produce a calendar for all twelve months in the given calendar year. If both month and year operands are given, cal shall
produce a one-month calendar for the given month in the given year.
OPTIONS
None.
OPERANDS
The following operands shall be supported:
month Specify the month to be displayed, represented as a decimal integer from 1 (January) to 12 (December).
year Specify the year for which the calendar is displayed, represented as a decimal integer from 1 to 9999.
STDIN
Not used.
INPUT FILES
None.
ENVIRONMENT VARIABLES
The following environment variables shall affect the execution of cal:
LANG Provide a default value for the internationalization variables that are unset or null. (See the Base Definitions volume of
POSIX.1-2008, Section 8.2, Internationalization Variables for the precedence of internationalization variables used to determine
the values of locale categories.)
LC_ALL If set to a non-empty string value, override the values of all the other internationalization variables.
LC_CTYPE Determine the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed
to multi-byte characters in arguments).
LC_MESSAGES
Determine the locale that should be used to affect the format and contents of diagnostic messages written to standard error, and
informative messages written to standard output.
LC_TIME Determine the format and contents of the calendar.
NLSPATH Determine the location of message catalogs for the processing of LC_MESSAGES.
TZ Determine the timezone used to calculate the value of the current month.
ASYNCHRONOUS EVENTS
Default.
STDOUT
The standard output shall be used to display the calendar, in an unspecified format.
STDERR
The standard error shall be used only for diagnostic messages.
OUTPUT FILES
None.
EXTENDED DESCRIPTION
None.
EXIT STATUS
The following exit values shall be returned:
0 Successful completion.
>0 An error occurred.
CONSEQUENCES OF ERRORS
Default.
The following sections are informative.
APPLICATION USAGE
Note that:
cal 83
refers to A.D. 83, not 1983.
EXAMPLES
None.
RATIONALE
Earlier versions of this standard incorrectly required that the command:
cal 2000
write a one-month calendar for the current calendar month (no matter what the current year is) in the year 2000 to standard output. This
did not match historic practice in any known version of the cal utility. The description has been updated to match historic practice. When
only the year operand is given, cal writes a twelve-month calendar for the specified year.
FUTURE DIRECTIONS
A future version of this standard may support locale-specific recognition of the date of adoption of the Gregorian calendar.
SEE ALSO
The Base Definitions volume of POSIX.1-2008, Chapter 8, Environment Variables
COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2013 Edition, Standard for Information Technol-
ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, Copyright (C) 2013 by the Institute of
Electrical and Electronics Engineers, Inc and The Open Group. (This is POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Stan-
dard is the referee document. The original Standard can be obtained online at http://www.unix.org/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source
files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
IEEE /The Open Group 2013 CAL(1P)