Sponsored Content
Full Discussion: Paste and double loop
Top Forums UNIX for Dummies Questions & Answers Paste and double loop Post 302940037 by A-V on Tuesday 31st of March 2015 11:35:05 PM
Old 04-01-2015
Error Paste and double loop

I have 2 directories and both had the same number of files with exactly same names but different content... I want to combine them horizontally but somehow I am stock

I think I need && to get the correct loop or maybe a filename? not sure...
this is what I have got for far which is not correct as it keeps looping until the dir 1 is done

Code:
FILE1="dir1/*"
for Q in $FILE1
do
	name=$(basename $Q) 
	FILE2="dir2/*"
	for T in $FILE2
	do
		names=$(basename $T) 
		paste -d, $Q $T > new/${names}
	done
done

thanks for helping
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

aside from paste

how can i make a script or command to have output like this $cat file 10000 20000 $cat a 10000 $cat b 20000 this is the solution paste a b > file but another solution? $cat file 10000 20000 (3 Replies)
Discussion started by: kenshinhimura
3 Replies

2. UNIX for Dummies Questions & Answers

VI paste out of alignment

We have a guy at work who is trying to copy and paste from one file to another using vi and highlighting the code to copy with a mouse. Source file: xyz 123 abc 999 zyx 321 cba 999 xyz 123 abc 999 But when he pastes it he gets (I put the underlines in to show... (4 Replies)
Discussion started by: dlam
4 Replies

3. Programming

double pow (double x, double y) -- problems

This is the code and I'm wondering why line 14: a = ... and line 16: b = ... is wrong. This is the first time I've tried to use this. Please help me. #include <stdio.h> #include <math.h> // The link and how the double pow is used. // // http://www.nextdawn.nl/c-reference/pow.php //... (2 Replies)
Discussion started by: pwanda
2 Replies

4. Shell Programming and Scripting

why double brackets for array loop?

Dear All, Recently got some sample from internet search for array handle in shell script, and I can not understand why we need to put double brackets when extracting array values by this way : for ((i=0; i<${#admins}; i++)); do echo "${admins}" done if modify from double to single... (2 Replies)
Discussion started by: tiger2000
2 Replies

5. Shell Programming and Scripting

cut and paste?

hi, I have a file with content like this for an employee: EmployeeID 101 Day_type, day vacation,1/2/2009 sick day, 3/2/2009 personal day, 4/5/2009 jury duty day, 5/5/2009 how do I make the result to show: EmployeeID,Day_type,day 101,vacation,1/2/2009 101,sick day,... (6 Replies)
Discussion started by: jbchen
6 Replies

6. UNIX for Dummies Questions & Answers

Paste

paste -d "\0" ap_cntrl_total.txt.1 ap_cntrl_total.txt.2, and it shows: 01234567890911051342C091026 0000910517990000000000009105179900000000CHOPME it put space btwn 1026 and 000091 should not have space. ---------- Post updated at 03:54 PM ---------- Previous update was at 03:03 PM... (1 Reply)
Discussion started by: tjmannonline
1 Replies

7. UNIX for Dummies Questions & Answers

Rename files with sed in an until loop (double post)

I want to change the name of some of my files (mypics-0001, mypics-0002, mypics-0003.....mypics-0240) and I want to double check to see if this code is right: x=0 until do sed 's/mypics\-*/bday/g' done Would this change all of my file names to "bday0001....bday0240"? Please let me... (0 Replies)
Discussion started by: jvpike
0 Replies

8. Shell Programming and Scripting

need a perl replacement for this double for loop

hi everybody, can you help me with this? important: it has to be a pure perl code. zz.lis: accessibility arabic archivers astro audio benchmarks . . . "ls accessibility | grep -v Makefile" outputs accerciser at-poke at-spi at-spi-reference (6 Replies)
Discussion started by: pseudocoder
6 Replies

9. Shell Programming and Scripting

awk, double variable, for loop and rsh

Hello folks, I've a (perhaps) simple question. In a text file I've : server_name1: directory1 server_name2: directory2 server_name3: directory3 I want to make a loop that lets me connect and operate on every server: rsh server_name1 "ls -l directory1" I've tried with awk,... (6 Replies)
Discussion started by: gogol_bordello
6 Replies

10. Shell Programming and Scripting

paste mutiple files in a loop

file1.txt file2.txt file3.txt desired output is each file is in the same directory, hasthe same number of columns but different rows. i want to be able to paste them into one file. thanks! (5 Replies)
Discussion started by: johnkim0806
5 Replies
wsimport(1)						      General Commands Manual						       wsimport(1)

NAME
wsimport - JAX-WS 2.0 SYNOPSIS
wsimport [options] wsdl DESCRIPTION
The wsimport tool generates JAX-WS portable artifacts, such as: o Service Endpoint Interface (SEI) o Service o Exception class mapped from wsdl:fault (if any) o Async Reponse Bean derived from response wsdl:message (if any) o JAXB generated value types (mapped java classes from schema types) These artifacts can be packaged in a WAR file with the WSDL and schema documents along with the endpoint implementation to be deployed. The generated Service class can be used to invoke the Web Service endpoint. OPTIONS
-d directory Specify where to place generated output files. -b path Specify external JAX-WS or JAXB binding files (Each file must have its own -b). -catalog Specify catalog file to resolve external entity references, it supports TR9401, XCatalog, and OASIS XML Catalog format. Please read the XML Entity and URI Resolvers document or see wsimport_catalog sample. -extension Allow vendor extensions (functionality not specified by the specification). Use of extensions may result in applications that are not portable or may not interoperate with other implementations. -help Display help. -httpproxy:host:port Specify an HTTP proxy server (port defaults to 8080). -keep Keep generated files. -p Specifying a target package via this command-line option, overrides any wsdl and schema binding customization for package name and the default package name algorithm defined in the specification. -s directory Specify where to place generated source files. -verbose Output messages about what the compiler is doing. -version Print version information. -wsdllocation location @WebService.wsdlLocation and @WebServiceClient.wsdlLocation value Multiple JAX-WS and JAXB binding files can be specified using -b option and they can be used to customize various things like package names, bean names, etc. More information on JAX-WS and JAXB binding files can be found in the customization documentation. Examples wsimport -d generated http://example.org/stock?wsdl This command generates JAX-WS portable artifacts for http://example.org/stock?wsdl in to the generated directory. wsimport stock.wsdl -b stock.xml -b stock.xjb The above example generates JAX-WS artifacts for stock.wsdl and uses the customization files stock.xml (jax-ws customization file) and stock.xjb (jaxb customization file) in the process. 07 Aug 2006 wsimport(1)
All times are GMT -4. The time now is 11:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy