08-15-2011
Quote:
Originally Posted by
manishabh
I want to use "paste " command in unix to do it but before that I have to get all my files to be of equal length.
No, you don't. You can use paste on files of different lengths and then replace empty fields with the desired default value. In my opinion, that's the easiest approach.
Regards,
Alister
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Very, very new to unix scripting and have a unique situation. I have a file of records that contain 3 records types:
(H)eader Records
(D)etail Records
(T)railer Records
The Detail records are 82 bytes in length which is perfect. The Header and Trailer records sometimes are 82 bytes in... (3 Replies)
Discussion started by: jclanc8
3 Replies
2. Shell Programming and Scripting
Hey everybody, I have a script for making a string substitution in a file. I am trying to modify it in order to make the same modifcation to multiples files. here is what I have so far.
#!/bin/csh
set p1="$1"
shift
set p2="$1"
shift
foreach x ($*)
if ( { grep -w -c "$p1" $x } ) then
mv... (7 Replies)
Discussion started by: iwatk003
7 Replies
3. UNIX for Dummies Questions & Answers
Hi Guys,
I was going some trial and error to see if I can find the longest word in a text.
I was using Pipes because they are easier to use in this case.
I was stuck on this for a while so I thought I'll get some help with it.
I tried this code to separate all the words in a text in... (4 Replies)
Discussion started by: bawse.c
4 Replies
4. Shell Programming and Scripting
Hello everyone,
The following are my input files.
The following are my sequence of steps.
Can someone please let me know about how to make these bunch of steps into a single script so that I start the script with 1.txt and 2.txt, after execution gives me the final... (11 Replies)
Discussion started by: jacobs.smith
11 Replies
5. Shell Programming and Scripting
Hello Everyone,
I am stuck with one issue while working on abstract flat file which i have to use as input and load data to table.
Input Data-
------ ------------------------ ---- -----------------
WFI001 Xxxxxx Control Work Item A Number of Records
------ ------------------------... (5 Replies)
Discussion started by: sonali.s.more
5 Replies
6. Shell Programming and Scripting
I want to make a script to read row by row and find its length. If the length is less than my required length then i hav to append spaces to that paritucular row. Each row contains special characters, spaces, etc.
For example my file contains ,
12345 abcdef
234 abcde
89012 abcdefgh
... (10 Replies)
Discussion started by: Amrutha24
10 Replies
7. Shell Programming and Scripting
Hello to all,
I'm trying to format a file to have all lines with the same length (the length of the longest line) adding needed extra spaces at the end.
Currently I have the awk script below that adds one space the end of each that have a lenght lower than 35, but I don't know
how to add... (3 Replies)
Discussion started by: Ophiuchus
3 Replies
8. SuSE
Hi All,
I would need your assistance to make a bootable USB with SUSE LINUX Enterprise Server
I have already downloaded relevant OS (Trail Version) packages @
1) SLES-11-SP4-DVD-i586-GM-DVD1
2) SLES-11-SP4-DVD-i586-GM-DVD2
when I tried to open these packages with PowerISO one of the... (7 Replies)
Discussion started by: Leaner_963
7 Replies
9. Shell Programming and Scripting
Hello,
I have a file with below content - Example
3
6
69
139
210
345
395
418
490
492
I would like the result as - Multiple of 70 or nearest number in the file less than the multiple of 70
69
139 (5 Replies)
Discussion started by: Mannu2525
5 Replies
10. Shell Programming and Scripting
Hi Team,
I have a different length records in my text file.I would like to make all the records with same length. I want to check the maximum lenth and all other records make the same length
It's urgent request.
Thanks in Advance (2 Replies)
Discussion started by: Anthuvan
2 Replies