Sponsored Content
Top Forums Shell Programming and Scripting Looping through 2 files simultaneously Post 302379031 by danmero on Wednesday 9th of December 2009 10:00:44 AM
Old 12-09-2009
Quote:
Originally Posted by gaurav1086
which unix are you using. It works on GNU/Linux though.
FreeBSD, but take a look at POSIX paste man page
Quote:
-d list
Unless a backslash character appears in list, each character in list is an element specifying a delimiter character. If a backslash character appears in list, the backslash character and one or more characters following it are an element specifying a delimiter character as described below. These elements specify one or more delimiters to use, instead of the default <tab>, to replace the <newline> of the input lines. The elements in list shall be used circularly; that is, when the list is exhausted the first element from the list is reused. When the -s option is specified:
......
\0
Empty string (not a null character). If '\0' is immediately followed by the character 'x', the character 'X', or any character defined by the LC_CTYPE digit keyword (see the Base Definitions volume of IEEE Std 1003.1-2001, Chapter 7, Locale), the results are unspecified.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help looping through files, please...

Okay... I've solved one problem. Here's the next. I'm writing a script file that needs to go through a directory and list all files in that directory. I'm using TCL/TK. I figured out how to go through the directory and how to loop through it, but I ran into a little problem. ... (2 Replies)
Discussion started by: kapolani
2 Replies

2. Shell Programming and Scripting

How to parse 2 files simultaneously

Say I have 2 files of 2 rows of 3 columns each file1: cat catdata1 catdata2 dog dogdata1 dogdata2 file2: cat catdata3 catdata4 dog dogdata3 dogdata4 and I need to combine both files so that is appears like: cat catdata1 catdata2 catdata3 catdata4 dog dogdata1 dogdata2 dogdata3... (8 Replies)
Discussion started by: Awanka
8 Replies

3. Shell Programming and Scripting

Looping through files...

I posted this in the Solaris forum, but I don't think it's platform specific, so I'm posting it here. Here is the situation. We are a company that has been using a professional publishing system, the software is called "ProType". It runs on Solaris 2.4, however it is no longer supported and we... (6 Replies)
Discussion started by: Fred Goldman
6 Replies

4. Shell Programming and Scripting

simultaneously create three empty files?

I can't get touch to simultaneously create three empty files file1, file2, file3. I tried:$ touch filebut all I got was one file:$ fileWhat did I do wrong? (4 Replies)
Discussion started by: na5m
4 Replies

5. Shell Programming and Scripting

Tailing 2 or more log files simultaneously PERL

Hi, I am having issue where I have to tail 3 log files continuously (forever) and while I am reading the files , parse them and shove the data into DB. I can do this with one file totally fine but how can I read 3 files at the same time? I am not really looking for code (but would be nice) but... (3 Replies)
Discussion started by: Dabheeruz
3 Replies

6. Shell Programming and Scripting

renaming multiple files simultaneously

Hi , I have a large no of files which all end in .asp.htm extension . But for proper navigation between the pages I need to rename all those files as .asp only . How can it be done ? (4 Replies)
Discussion started by: nshailesh
4 Replies

7. Shell Programming and Scripting

looping through files

I am writing a ksh which has to load 7 files(.dat files) from input directory into oracle tables using sql loader. The process has to take each file at a time and once if it is loaded succesfully using sql loader into oracle tables then the process has to pick next file and load it into oracle... (2 Replies)
Discussion started by: vpv0002
2 Replies

8. UNIX for Dummies Questions & Answers

can I create symbolic links for multiple files simultaneously

Does anybody know how to make symbolic links for multiple files simultaneously? Often times I need make symbolic links for multiple files with some common pattern (just like "*.jpg"). Is there a way to avoid making symbolic link for each of them one by one... Thank you! (6 Replies)
Discussion started by: danieladna
6 Replies

9. Shell Programming and Scripting

Handling 2 files simultaneously with awk

Hello, Is it possible to handle data from two different files at once in awk (latest version and platform is Fedora). I found on the net that we cannot nest awk. My requirement is that I have two similar files : File 1: Name: abc Val = 58 Name: cdf Val = 1; .................. File... (7 Replies)
Discussion started by: fifteate
7 Replies

10. Shell Programming and Scripting

how to delete files on two remote servers simultaneously?

dear all, i'm preparing a script which can do these actions : 1. stop remove server's certain service 2. clean the files on remote servers simultaneously (because lots of files need to be deleted) 3. after files/logs are removed, restart the service again i'm stuck on how to clean remote... (4 Replies)
Discussion started by: tiger2000
4 Replies
diff3(1)						      General Commands Manual							  diff3(1)

NAME
diff3 - 3-way differential file comparison SYNOPSIS
file1 file2 file3 DESCRIPTION
compares three versions of a file, and prints disagreeing ranges of text flagged with these codes: all three files differ file1 is different file2 is different file3 is different The type of change required to convert a given range of a given file to some other is indicated in one of these ways: Text is to be appended after line number n1 in file f, where f = or Text is to be changed in the range line n1 through line n2. If n1 = n2, the range can be abbreviated to n1. The original contents of the range follows immediately after a indication. When the contents of two files are identical, the contents of the lower-numbered file is suppressed. Produces a script for the editor that can be used to incorporate into file1 all changes between file2 and file3 (see ed(1)); i.e., the changes that normally would be flagged and Produces a script to incorporate only changes flagged Produces a script to incorporate only changes flagged Produces a script that will incorporate all changes between file2 and file3, but treat overlapping changes (that is, changes that would be flagged with in normal listing) differently. The overlapping lines in both files will be inserted by the edit script bracketed by and lines. Produces a script that will incorporate only changes flagged , but treat these changes in the manner of option. The following command applies the resulting script to file1. EXTERNAL INFLUENCES
International Code Set Support Single- and multi-byte character code sets are supported. WARNINGS
Text lines that consist of a single period defeat Files longer than 64K bytes do not work. FILES
SEE ALSO
diff(1). diff3(1)
All times are GMT -4. The time now is 02:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy