Sponsored Content
Full Discussion: create control file in UNIX
Top Forums UNIX for Dummies Questions & Answers create control file in UNIX Post 302075620 by alfredo123 on Monday 5th of June 2006 11:02:33 PM
Old 06-06-2006
Error create control file in UNIX

UNIX gurus:

Following is what I am trying to do:

I need to create a control file for another file that I am creating. The information needed in the control file is the date in YYYYMMDD format and then the number of records in the other file right justified and lpadded with spaces of 20.

So say I have a file a.dat and it has 200 records.
I need to create a control file a.ctl having the following data.

20060605 200

I can only use UNIX commands as I am not allowed to use any scripts. I know date +'%Y%m%d' will give me the date in YYYYMMDD format and wc -l <filename> would give me record count but how would I go about piping the output of the above to one control file?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Hidden control characters in a Unix Text File!

Can anyone seem to know how to find out whether a UNIX text file has 'hidden' control characters? Can I view them using 'vi' by some command line options? If there are control characters in a text file which are invisible/hidden.. then how do I get rid of them? Your intelletual answers are... (6 Replies)
Discussion started by: kewl_guy
6 Replies

2. UNIX for Dummies Questions & Answers

How to find the ^M(control M) character in unix file?

can any one say about command to find "^M" (Control M)characters in a unix text file. ^M comes when a file ftped from windows to unix without using bin mode. I need the command to find lik this, ex.txt: ------------------------------ ...,name,time^M go^M ...file,end^M... (5 Replies)
Discussion started by: prsam
5 Replies

3. Shell Programming and Scripting

display all possible control characters from .xml file in unix

Hi, I have a .xml file in unix. We are passing this file through a xml parser. But we are getting some control characters from input file and XML parser is failing for the control character in file.Now I am getting following error, Error at byte 243206625 of file filename_$.xml: Error... (1 Reply)
Discussion started by: fantushmayu
1 Replies

4. Shell Programming and Scripting

Extra control characters being added when I create a file using cat command

Hi, I am using Cygwin.I created a new file and type into it using cat > newfile. When I open this using vi editor, it contains loads of extra control characters. Whats happening? (1 Reply)
Discussion started by: erora
1 Replies

5. Shell Programming and Scripting

control M character in unix file

in a file we are getting control character in a file , is there any way that they can be removed once we have the file for eg. BEGIN-PROCEDURE INITIALIZE ^M LET #row_count = 0^M ^M ^M (2 Replies)
Discussion started by: lalitpct
2 Replies

6. Shell Programming and Scripting

Create a File for Version Control

Hi , I have to create a file with 3 columns A,B,C. I have to read the column A,B values from a text pad. Where as Column a contains approximately 10 values and column B has 1 value which is constant. Column C is a version control column ,initially the value would be 1. (1 Reply)
Discussion started by: Inform123
1 Replies

7. Shell Programming and Scripting

Request for advise on how to remove control characters in a UNIX file extracted from top command

Hi, Please excuse for posting new thread on control characters, I am facing some difficulties in removing the control character from a file extracted from top command, i am able to see control characters using more command and in vi mode, through cat control characters are not visible ... (8 Replies)
Discussion started by: karthikram
8 Replies

8. Shell Programming and Scripting

Create a control file from Table definition

Hi Team, I need to create a control file with a pre-defined structure for a given table name. The table is in teradata. Ex: Table Name: TBL1 Table structure: create multiset table tbl1, no fallback, no before journal, no after journal, checksum = default, default mergeblockratio... (7 Replies)
Discussion started by: unankix
7 Replies

9. Shell Programming and Scripting

Script to create the SQLLDR control file from Oracle table.

I need to create the shell script load the few 100 table using the SQLLDR. Need to generate the control file for each table using oracle table. table has "table names" and "column names" using this need create the control file. example table rows below table_nme column_nme DEPT ... (2 Replies)
Discussion started by: pimmit22043
2 Replies

10. UNIX for Beginners Questions & Answers

Script for creating Control file in UNIX

Delete ---- Original post, restored by mod after being deleted by abhilashnair ---- I have a requirement where, I need to create a control file which will have 3 columns in the header row as below: Filename Count Checksum This above control file has to contain metadata as above... (2 Replies)
Discussion started by: abhilashnair
2 Replies
deb-old(5)							    dpkg suite								deb-old(5)

NAME
deb-old - old style Debian binary package format SYNOPSIS
filename.deb DESCRIPTION
The .deb format is the Debian binary package file format. This manual page describes the old format, used before Debian 0.93. Please see deb(5) for details of the new format. FORMAT
The file is two lines of format information as ASCII text, followed by two concatenated gzipped ustar files. The first line is the format version number padded to 8 digits, and is 0.939000 for all old-format archives. The second line is a decimal string (without leading zeroes) giving the length of the first gzipped tarfile. Each of these lines is terminated with a single newline character. The first tarfile contains the control information, as a series of ordinary files. The file control must be present, as it contains the core control information. In some very old archives, the files in the control tarfile may optionally be in a DEBIAN subdirectory. In that case, the DEBIAN subdirectory will be in the control tarfile too, and the control tarfile will have only files in that directory. Optionally the control tarfile may contain an entry for '.', that is, the current directory. The second gzipped tarfile is the filesystem archive, containing pathnames relative to the root directory of the system to be installed on. The pathnames do not have leading slashes. SEE ALSO
deb(5), dpkg-deb(1), deb-control(5). 1.19.0.5 2018-04-16 deb-old(5)
All times are GMT -4. The time now is 06:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy