Sponsored Content
Top Forums Shell Programming and Scripting How to combined to file with their values Post 302270558 by Christoph Spohr on Monday 22nd of December 2008 07:29:36 AM
Old 12-22-2008
What exactly is not working?
What is the error message? What is the output?

It tried it on my debian box under bash and zsh and it is working fine.
You should find the output in a file called "file3".
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to combined file?

hello there unix programmer i have problem in combining file and their values.. here it is. in my file1 i have values 1010<tab>10<tab>11<tab>13 1011<tab>11<tab>12<tab>14 in my file2 i have values 1010<tab>22<tab>23<tab>24 1011<tab>23<tab>24<tab>25 my desired output in shell... (7 Replies)
Discussion started by: jantzen16
7 Replies

2. Shell Programming and Scripting

Merging of files with different headers to make combined headers file

Hi , I have a typical situation. I have 4 files and with different headers (number of headers is varible ). I need to make such a merged file which will have headers combined from all files (comman coluns should appear once only). For example - File 1 H1|H2|H3|H4 11|12|13|14 21|22|23|23... (1 Reply)
Discussion started by: marut_ashu
1 Replies

3. Shell Programming and Scripting

Replacing values in a file based on values in another file

Hi I have 2 files:- 1. List of files which consists of names of some output files. 2. A delimited file; delimted by "|" I want to replace the value of the $23 (23rd column) in the delimited file with name in the first file. It is always position to position. Meaning first row of the first... (5 Replies)
Discussion started by: pparthiv
5 Replies

4. Shell Programming and Scripting

remove values of a file one by one from 2nd file and then print the remaining values of 2nd file

Hi all, I have 2 files. One contains only 1 column and other one contains 2 columns, let say 1_col.txt and 2_col.txt respectively. Here, I will try to explain with an example. Input files : 1_col.txt 2_col.txt a a b x a c p ... (5 Replies)
Discussion started by: AshwaniSharma09
5 Replies

5. Shell Programming and Scripting

Compare values in two files. For matching rows print corresponding values from File 1 in File2.

- I have two files (File 1 and File 2) and the contents of the files are mentioned below. - I am trying to compare the values of Column1 of File1 with Column1 of File2. If a match is found, print the corresponding value from Column2 of File1 in Column5 of File2. - I tried to modify and use... (10 Replies)
Discussion started by: Santoshbn
10 Replies

6. Shell Programming and Scripting

Read record from the text file contain multiple separated values & assign those values to variables

I have a file containing multiple values, some of them are pipe separated which are to be read as separate values and some of them are single value all are these need to store in variables. I need to read this file which is an input to my script Config.txt file name, first path, second... (7 Replies)
Discussion started by: ketanraut
7 Replies

7. Shell Programming and Scripting

awk combined with an IF

Hi everybody! I try to printout a csv-file with the exeption of cell $1 and $4. what i tried so far: awk '{for(i = 1; i<=NF; i++);if(i == 1 || i == 4);else print($i)}' file.csv ..any ideas how it work and why my example fails? Thanks in advance! IMPe (3 Replies)
Discussion started by: IMPe
3 Replies

8. Shell Programming and Scripting

awk file to read values from Db2 table replacing hard coded values

Hi, I want to replace a chain of if-else statement in an old AWK file with values from Db2 table or CSV file. The part of code is below... if (start_new_rec=="true"){ exclude_user="false"; user=toupper($6); match(user, "XXXXX."); if (RSTART ==2 ) { ... (9 Replies)
Discussion started by: asandy1234
9 Replies

9. Shell Programming and Scripting

Combined sed+awk for lookup csv file

have written a combined sed+awk to perform a lookup operation which works but looking to enhance it. looking to match a record using any of the comma separated values + return selected fields from the record - including the field header. so: cat foo make,model,engine,trim,value... (6 Replies)
Discussion started by: jack.bauer
6 Replies

10. Shell Programming and Scripting

Taking key values from one file and extracting values from another file

Hi, I have two files with values in both. File1: cat 2 3 dog 4 5 elephant 6 7 camel 2 3 File2: ----+--gkf;ajf= ---+---- +----- cat -------=----+ 3 | 4 ----- dog ------++-- 5 | 9 ----++-- elephant | 5 | 7 ---++ camel ------ ++++_---- || 8 | 9 I want the final file as: cat 4... (1 Reply)
Discussion started by: npatwardhan
1 Replies
COMMIT-PATCH(1) 						   User Commands						   COMMIT-PATCH(1)

NAME
commit-patch - commit patches to Darcs, Git, Mercurial, Bazaar, Subversion, or CVS repositories SYNOPSIS
commit-patch [--amend] [-m message] [-F message-file] [-v] [--dry-run] [patch-file] commit-partial [--amend] [-v] [--dry-run] [--retry] [file ...] DESCRIPTION
Normally version control systems don't allow fine grained commits. commit-patch allows the user to control exactly what gets committed (or "recorded", in Darcs parlance) by letting the user supply a patch to be committed rather than using the files in the current working directory. If patch-file is not supplied on the command line then the patch will be read from standard input. commit-partial is like commit-patch except that it will create a patch from the current changes in the current working directory and launch your editor so that you can edit the patch and the commit message (using the VISUAL environment variable, or if that isn't set the EDITOR environment variable, or, if that isn't set, vi. Any files you specify will be passed to your version control's diff command. commit-patch currently supports the following version control systems: Darcs, Git, Mercurial, Bazaar, Subversion, and CVS. OPTIONS
-a, --amend - Amend a previous commit. Currently only Darcs and Git support this option. When used with Git it will amend the previous commit. When used with Darcs, Darcs will ask you which patch you want to amend. -m, --message=message - An optional message to use as the commit text. If the message is multiple lines then Darcs, Git, and Mercurial will use the first line as the patch name and the rest as commit details. If the "-m" option is not specified then the result will be the same as whatever the underlying version control system would do if you didn't specify a message name on the command line. That is, commit-patch does not interfere with the patch naming process of the underlying version control system; Darcs will still ask you interactively; CVS and Subversion will still launch your editor. -F, --message-file=filename - You can optionally get the commit message from a file. This is generally only useful for scripting commit- patch. -v, --verbose - Turn on debugging. This will print the commands that commit-patch is running to get the patch committed. -n, --dry-run - Turn on more paranoid debugging. This will print the commands that commit-patch will run to get the patch committed but it won't actually run those commands. -r, --retry - Only available in commit-partial. This will reload the last patch that was attempted to be committed into your editor instead of the current changes in the directory. This is for cases where the patch fails to commit for some reason and you want to try to fix it instead of starting over. DIAGNOSTICS
commit-patch works by manipulating the working directory using "patch", "interdiff", and the underlying version control system's "diff". If any part of the process fails, commit-patch will attempt to restore the working directory to the state it was before the command was run. Any errors from the underlying version control system or from patch will be printed. CAVEATS
The patch specified on the command line must originate from the same place as the current directory. That is, the following will not work: cvs diff -u > ../a.patch cd .. commit-patch a.patch You must run commit-patch from the same directory that the original patch was based from. Darcs, Git and Mercurial put "a/" and "b/" in front of all the paths in the diff output. Don't worry about this; commit-patch takes it into account. EXAMPLES
Typical CVS usage: cvs diff -u > a.patch emacs a.patch commit-patch a.patch Mercurial usage with a message specified: hg diff > a.patch emacs a.patch commit-patch -m "This is a commit message" a.patch Darcs usage with a multi-line message specified: darcs diff -u > a.patch emacs a.patch commit-patch -m 'This is the patch name Here are the patch details' a.patch AUTHORS
o David Caldwell <david@porkrind.org> o Jim Radford <radford@blackbean.org> COPYRIGHT AND LICENSE
Copyright 2003-2010 by David Caldwell and Jim Radford. commit-patch is distributed under the GNU General Public License. See the COPYING file in the distribution for more details. HISTORY
commit-patch was originally called "cvs-commit-patch" and was a bash script written in 2003 by Jim Radford (with David Caldwell in the room drawing the procedure on a white board). David later converted it do "darcs-commit-patch", then integrated them back together into commit- patch. Mercurial support was then added. At some point David translated from bash into perl because funky bash quoting issues were causing problems with a repository that had a space in one of the directory names. perl v5.10.1 2011-02-23 COMMIT-PATCH(1)
All times are GMT -4. The time now is 09:55 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy