LPAD in UNIX


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers LPAD in UNIX
# 1  
Old 04-01-2013
LPAD in UNIX

Hi,

Can we do Lpad in unix using awk or sed, I have a pipe delimiter file in which 4th column should have length of 17 characters, but in the source files the value for these are not consistent some values are coming as 8 characters and some are coming as 15 characters ..etc..Please suggest if there is any command in awk or sed which can see the length of 4th column size is less than 17 characters than it has to append zeros till the length is 17 charterers and print rest of the line with the lpaded values.

Thanks.

Regards,
Gaur
# 2  
Old 04-02-2013
Refer GNU AWK Format Modifiers to perform padding
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to change LPad user password?

Hi Gurus, I am lpad user in some of my server. I need to change password at certain period time. I am wondering what is the command to change the passwd. last time I asked my unix admin, they gave me a comand I chagned it. (I forgot to keep it in safe place, I lost it). this time when... (2 Replies)
Discussion started by: ken6503
2 Replies

2. Shell Programming and Scripting

File Transfer from Window server to UNIX and UNIX to UNIX

Dear All, Can someone help to command or program to transfer the file from windows to Unix server and from one unix server to another Unix server in secure way. I would request no samba client. (4 Replies)
Discussion started by: yadavricky
4 Replies

3. UNIX for Dummies Questions & Answers

How does unix system administration, unix programming, unix network programming differ?

How does unix system administration, unix programming, unix network programming differ? Please help. (0 Replies)
Discussion started by: thulasidharan2k
0 Replies

4. Shell Programming and Scripting

Batch job in unix server to move the pdf file from unix to windows.

Hi Experts, I have a requirement where i need to setup a batch job which runs everymonth and move the pdf files from unix server to windows servers. Could some body provide the inputs for this. and also please provide the inputs on how to map the network dirve in the unix like that... (1 Reply)
Discussion started by: ger199901
1 Replies

5. Shell Programming and Scripting

FTP script for sending a file from one unix directory to another unix server director

Hi, My local server is :/usr/abcd/ Remote server is :/Usr/host/test/ I want to send files from local unix directory(All files starting with O_999) to remote host unix directory. Can any body give me the Unix Shell script to do this. One more doubt: Shall we need to change the file... (1 Reply)
Discussion started by: raja_1234
1 Replies

6. Shell Programming and Scripting

grep with LPAD or RPAD

Hi, Are there any options for using options like RPAD(),LPAD() functions in SQL?If yes, How can I use grep command with thease options? Any help would be appreciated. Thanks in Advance. -Harish (5 Replies)
Discussion started by: harish_oty
5 Replies

7. UNIX for Advanced & Expert Users

missing Path(in UNIX) when i launch a job on to unix machine using windows SSh

hi i want run an unix application from a windows program/application.i am using SSH(command line version)to log on to a unix machine from windows. the application has to read a configuration file inorder to run. the configuration file .CFG is in bin in my home directory. but the application... (1 Reply)
Discussion started by: megastar
1 Replies

8. UNIX for Dummies Questions & Answers

UNIX problem? Unix programm runs windows 2000 CPU over 100%

Okee problems...!! What is happening: Unix server with some programms, workstations are windows 2000, the workstations work good but when you start a programm on the Unix server the CPU of the workstations go to 100% usage resulting that the system gets very slow. The programm well its running so... (2 Replies)
Discussion started by: zerocool
2 Replies
Login or Register to Ask a Question