Sponsored Content
Top Forums Shell Programming and Scripting Replace first column in 17GB File Post 302962961 by MadeInGermany on Monday 21st of December 2015 12:51:36 PM
Old 12-21-2015
Hmm, shouldn't sed -i put the temporary file near the source file, to have an efficient move(=rename)?
And the difference to Aia's explicit mv command is only that the owner/mode is preserved.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

how to unzip 17GB .zip file on UNIX?

I have a .zip file of size 17GB on Linux. As per my knowledge unzip(before 6.X version) doesn't work with file size greater than 4GB. I tried my best to uncompress it but didn't successed. Can anybody help me out with this? Any help will be greatly appreciated. Thank you. Regards, Chandu (2 Replies)
Discussion started by: chance04
2 Replies

2. Shell Programming and Scripting

Match column 3 in file1 to column 1 in file 2 and replace with column 2 from file2

Match column 3 in file1 to column 1 in file 2 and replace with column 2 from file2 file 1 sample SNDK 80004C101 AT XLNX 983919101 BB NETL 64118B100 BS AMD 007903107 CC KLAC 482480100 DC TER 880770102 KATS ATHR 04743P108 KATS... (7 Replies)
Discussion started by: rydz00
7 Replies

3. UNIX for Dummies Questions & Answers

Replace values in a specified column of a file

Hello, I have a file with four columns and I would like to replace values in the second column only. An arbitrary example is: 100 A 105 B 200 B 205 C 300 C 305 D 400 D 405 E 500 E 505 F I need to replace the second column as shown below: ... (4 Replies)
Discussion started by: Gussifinknottle
4 Replies

4. Shell Programming and Scripting

Replace column with column from another file

Hello, I am trying to replace the column in file1 with the column from file2. The two files will have the same amount of rows. Each row will correspond with the same row in the other file. File1 "Replace this column" 500 13-APR-2011... (11 Replies)
Discussion started by: doobe01
11 Replies

5. UNIX for Dummies Questions & Answers

replace a column with values from another file

Dear all, I have a file1.pdb in pdb format and a dat file2 containing values, corresponding to the atoms in the pdb file. these values (file2.dat) need to be in the column instead of the 0.00 (file1) values for each atom in file1.pdb .(the red values must be replaced by the blue ones,in order)... (11 Replies)
Discussion started by: chen.xiao.po
11 Replies

6. Shell Programming and Scripting

Replace column that matches specific pattern, with column data from another file

Can anyone please help with this? I have 2 files as given below. If 2nd column of file1 has pattern foo1@a, find the matching 1st column in file2 & replace 2nd column of file1 with file2's value. file1 abc_1 foo1@a .... abc_1 soo2@a ... def_2 soo2@a .... def_2 foo1@a ........ (7 Replies)
Discussion started by: prashali
7 Replies

7. Shell Programming and Scripting

Replace 2nd column in file

I have following entries file abc.txt abc83.out.remote TRUE abc84.out.remote TRUE abc85.out.remote TRUE abc86.out.remote TRUE Please help me, how do i toggle the entries listed in 2nd column based on the search patterns (abcxx) abcxx, i can get... (14 Replies)
Discussion started by: sdosanjh
14 Replies

8. Shell Programming and Scripting

Replace column values from other file

I have one file as it has the following format File1 S No Site IP Address 1 Australia 192.168.0.1/26 2 Australia 192.168.0.2/26 3 Australia 192.168.0.3/26 I need awk/sed command to replace the column2 value ( under Site) with some other... (8 Replies)
Discussion started by: samaritan
8 Replies

9. Emergency UNIX and Linux Support

Need to replace a column value in UNIX file

Hi All, I am having a file like below 01098546 3 56120610010377101008311121 001382 71 003 5011339 01099413 1 42120500010247081106112121 000304 46 002 2011339 I want to replace the 78 column from 3 to 4 and I need the file as below 01098546 ... (1 Reply)
Discussion started by: arunkumar_mca
1 Replies

10. Shell Programming and Scripting

Match column 8 in file 1 with column 2 in file 2 and replace..

I am looking at the NR==FNR posts and trying to use them to achieve the following but I am not getting it. I have 2 files. I want to match column 8 in file 1 with column 2 in file 2. When they match I want to replace column 9 in file 1 with column 1 in file 2. This is and extract from file 1 ... (5 Replies)
Discussion started by: kieranfoley
5 Replies
cpset(1M)																 cpset(1M)

NAME
cpset - install object files in binary directories SYNOPSIS
object directory mode owner group]]] DESCRIPTION
The command installs the specified object file in the given directory. The mode, owner, and group, of the destination file can be speci- fied on the command line. If this data is omitted, two results are possible: o If you have administrative permissions (that is, your numerical ID is less than 100), the following defaults are provided: mode o If you do not have administrative permissions, the default mode, owner, and group of the destination file are the same as yours. The option forces to move object to in the destination directory before installing the new object. reads the file to determine the final destination of the file to be installed. The file contains pairs of path names separated by spaces or tabs. The first name is the "official" destination (for example: The second name is the new destination. If is moved from to the entry in would be: When the actual installation happens, verifies that the "old" pathname does not exist. If a file exists at that location, issues a warning and continues. This file does not exist on a distribution tape; it is used by sites to track local command movement. The procedures used to build the source are responsible for defining the "official" locations of the source. Cross Generation The environment variable is used to locate the destination file (in the form This is necessary in the cases where cross generation is being done on a production system. EXAMPLES
If you are an administrator, all of the following examples have the same effect. They copy file into with mode, owner, and group set to respectively: If you are not an administrator, the last two examples set mode, owner, and group to your current values. SEE ALSO
chacl(1), make(1), install(1M), acl(5). cpset(1M)
All times are GMT -4. The time now is 10:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy