Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Swapping content b/n two files Post 302985946 by RudiC on Thursday 17th of November 2016 08:28:48 AM
Old 11-17-2016
Pure shell:
Code:
{ read L11; read L12; read L21 <&3; read L22 <&3; echo $L11; echo $L22; echo $L21 >&4; echo $L12 >&4; } <file1 3<file2 4>TMP

For longer files, you may add a tail -n+3 for each file.
This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

content need changes- many files

Hi, all Need some advise on this script i have some files in a directory, and i need to change the word XX in each files to YY, how can i perform a bulk changes/ thanks in advance for yr sharing (3 Replies)
Discussion started by: swchee
3 Replies

2. Shell Programming and Scripting

comparing files content

hi i have a set of files , i need to compare one file content with other file content, i am using cmp -s abc.1 def.2 , but it is not giving theproper o/p even if the content is different.Please help thanks Satya (1 Reply)
Discussion started by: Satyak
1 Replies

3. UNIX for Dummies Questions & Answers

display files name and it's content

hello, i have a question and i'll be appreciated if you can help me with this. i have i folder let's say "users" in this folder there are files (file1, file2, file2, etc) and in each file there is a number (lets say 4 in file1) i want to display some thing like bellow file1 4... (6 Replies)
Discussion started by: dndoon
6 Replies

4. Shell Programming and Scripting

Help with Combining Content of Two files

I'm trying to combine it using awk but still can't figure it out. Here is the file. cat file1.txt Mr Smith Mr John Ms Linda cat file2.txt No 4 Jln Empat Kuala Lumpur No 213 Tmn Bunga Kedah No 1 Kampung Bukit Malaysia I want to combine this file1 and file2 so the output... (5 Replies)
Discussion started by: pisang
5 Replies

5. Shell Programming and Scripting

how to find a content in all files

Hi, i would like to find 'AppManage' in all files. i have tried the following but it didn't work. /local/home/mani>grep -iR 'AppManage' *.* - not outcome /local/home/mani>grep -iR 'AppManage' - this one hangs thanks (3 Replies)
Discussion started by: lookinginfo
3 Replies

6. Shell Programming and Scripting

Files appear to have no content

I have about 11000 files on a hard disk that were generated by copying a directory structure from a dvd. The files are supposed to contain ascii data. I am unable to read or inspect the contents of several of the files, I receive the error no such file or directory. I am using cygwin on... (4 Replies)
Discussion started by: jvorwald
4 Replies

7. Shell Programming and Scripting

Changing and swapping the Values in the files

Hi all we have a file ONE like this 12345 98765 67222 74252 76991 90091 and we have one more file TWO like huiiii 67jjjj u988 99999 uj99j 98765 hujg 7yhh ij999 78688 ijo99 74252 Now i want create THREE file which is like huiiii 67jjjj u988 12345 uj99j 98765 hujg 7yhh ij999... (2 Replies)
Discussion started by: polineni
2 Replies

8. Shell Programming and Scripting

search for content in files. Name of files is in another file. Format as report.

Hi I have multiple files in a folder and one file which contains a list of files (one on each line). I was to search for a string only within these files and not the whole folder. I need the output to be in the form File1<tab>string instance 2<tab> string instance 2<tab>string instance 3... (6 Replies)
Discussion started by: pkabali
6 Replies

9. Shell Programming and Scripting

Compare content between two files

I have two files in unix environment with similer type of contain: Example: File1 File2 Milestone1 Milestone1 Milestone2 Milestone12 Milestone3 Milestone13... (11 Replies)
Discussion started by: Mrinal Mondal
11 Replies

10. UNIX for Beginners Questions & Answers

Comparing two files and list the difference with common first line content of both files

I have two file as given below which shows the ACL permissions of each file. I need to compare the source file with target file and list down the difference as specified below in required output. Can someone help me on this ? Source File ************* # file: /local/test_1 # owner: own #... (4 Replies)
Discussion started by: sarathy_a35
4 Replies
zlahef.f(3)							      LAPACK							       zlahef.f(3)

NAME
zlahef.f - SYNOPSIS
Functions/Subroutines subroutine zlahef (UPLO, N, NB, KB, A, LDA, IPIV, W, LDW, INFO) ZLAHEF Function/Subroutine Documentation subroutine zlahef (characterUPLO, integerN, integerNB, integerKB, complex*16, dimension( lda, * )A, integerLDA, integer, dimension( * )IPIV, complex*16, dimension( ldw, * )W, integerLDW, integerINFO) ZLAHEF Purpose: ZLAHEF computes a partial factorization of a complex Hermitian matrix A using the Bunch-Kaufman diagonal pivoting method. The partial factorization has the form: A = ( I U12 ) ( A11 0 ) ( I 0 ) if UPLO = 'U', or: ( 0 U22 ) ( 0 D ) ( U12**H U22**H ) A = ( L11 0 ) ( D 0 ) ( L11**H L21**H ) if UPLO = 'L' ( L21 I ) ( 0 A22 ) ( 0 I ) where the order of D is at most NB. The actual order is returned in the argument KB, and is either NB or NB-1, or N if N <= NB. Note that U**H denotes the conjugate transpose of U. ZLAHEF is an auxiliary routine called by ZHETRF. It uses blocked code (calling Level 3 BLAS) to update the submatrix A11 (if UPLO = 'U') or A22 (if UPLO = 'L'). Parameters: UPLO UPLO is CHARACTER*1 Specifies whether the upper or lower triangular part of the Hermitian matrix A is stored: = 'U': Upper triangular = 'L': Lower triangular N N is INTEGER The order of the matrix A. N >= 0. NB NB is INTEGER The maximum number of columns of the matrix A that should be factored. NB should be at least 2 to allow for 2-by-2 pivot blocks. KB KB is INTEGER The number of columns of A that were actually factored. KB is either NB-1 or NB, or N if N <= NB. A A is COMPLEX*16 array, dimension (LDA,N) On entry, the Hermitian matrix A. If UPLO = 'U', the leading n-by-n upper triangular part of A contains the upper triangular part of the matrix A, and the strictly lower triangular part of A is not referenced. If UPLO = 'L', the leading n-by-n lower triangular part of A contains the lower triangular part of the matrix A, and the strictly upper triangular part of A is not referenced. On exit, A contains details of the partial factorization. LDA LDA is INTEGER The leading dimension of the array A. LDA >= max(1,N). IPIV IPIV is INTEGER array, dimension (N) Details of the interchanges and the block structure of D. If UPLO = 'U', only the last KB elements of IPIV are set; if UPLO = 'L', only the first KB elements are set. If IPIV(k) > 0, then rows and columns k and IPIV(k) were interchanged and D(k,k) is a 1-by-1 diagonal block. If UPLO = 'U' and IPIV(k) = IPIV(k-1) < 0, then rows and columns k-1 and -IPIV(k) were interchanged and D(k-1:k,k-1:k) is a 2-by-2 diagonal block. If UPLO = 'L' and IPIV(k) = IPIV(k+1) < 0, then rows and columns k+1 and -IPIV(k) were interchanged and D(k:k+1,k:k+1) is a 2-by-2 diagonal block. W W is COMPLEX*16 array, dimension (LDW,NB) LDW LDW is INTEGER The leading dimension of the array W. LDW >= max(1,N). INFO INFO is INTEGER = 0: successful exit > 0: if INFO = k, D(k,k) is exactly zero. The factorization has been completed, but the block diagonal matrix D is exactly singular. Author: Univ. of Tennessee Univ. of California Berkeley Univ. of Colorado Denver NAG Ltd. Date: November 2011 Definition at line 158 of file zlahef.f. Author Generated automatically by Doxygen for LAPACK from the source code. Version 3.4.1 Sun May 26 2013 zlahef.f(3)
All times are GMT -4. The time now is 02:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy