| | |
Need help to padding the word to create flat files
Please support our Shell Scripting advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Oct 2006
Posts: 13
Reputation:
Solved Threads: 0
HI
I would likt to create input files for testing, format is like this
INPUT Format
DISP NUM BYTES Desc
0 4 CODE
4 10 EMP NO
14 3 AGE
17 1 SEX
which will be used for creating flat files ( data in excel file).
OUTPUT file should be continous like
CODE19239625M
like this
Here CODE is the EMPCODE, 192396 is EMPNO, 25 is the AGE and M is SEX.
Can anyone will lead me to write the script ......... PLZ help
I would likt to create input files for testing, format is like this
INPUT Format
DISP NUM BYTES Desc
0 4 CODE
4 10 EMP NO
14 3 AGE
17 1 SEX
which will be used for creating flat files ( data in excel file).
OUTPUT file should be continous like
CODE19239625M
like this
Here CODE is the EMPCODE, 192396 is EMPNO, 25 is the AGE and M is SEX.
Can anyone will lead me to write the script ......... PLZ help
Madan Kumar T
Bangalore.
Bangalore.
Check out the man pages for printf.
Last edited by masijade; Dec 19th, 2007 at 8:23 am. Reason: typo
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
![]() |
Other Threads in the Shell Scripting Forum
- Previous Thread: How to get drive letter, by using 'volume label'?
- Next Thread: How to padd the words in unix script.... Help required
| Thread Tools | Search this Thread |






