Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Copy files if column 5 in a file contains “V” Post 303042663 by MadeInGermany on Thursday 2nd of January 2020 03:38:55 PM
Old 01-02-2020
In awk better print "quotes" around the filenames because they become command arguments in sh where unquoted arguments are subject to substitutions.
Code:
{print "cp \"" FILENAME "\" /test/V_files/"; exit}

The exit ensures that the filename is printed only once.
These 2 Users Gave Thanks to MadeInGermany For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

copy column to another file

Hi guys, I want to use a quick one liner that can copy an entire column, and add it to a new file as another column. I've tried using cat, but that only appends my column to the bottom of the file. So now, my first file(file1) looks like this: 1995060101 8 1995060102 6 1995060102... (1 Reply)
Discussion started by: penlok
1 Replies

2. Shell Programming and Scripting

How to copy Content of a file to another file on a specific column

Hi i have a file (file1)with this content: 1.2.3.10.in-addr.arpa and a second file (file2) with a content wich have 8 Columns if a do a awk '{print $8}' file2 i become this output: ,'10.3.2.1.', So i want to replace only the 10.3.2.1. in file2 (column 8) with the information... (8 Replies)
Discussion started by: tuxus
8 Replies

3. Shell Programming and Scripting

comparing column of two different files and print the column from in order of 2nd file

Hi friends, My file is like: Second file is : I need to print the rows present in file one, but in order present in second file....I used while read gh;do awk ' $1=="' $gh'" {print >> FILENAME"output"} ' cat listoffirstfile done < secondfile but the output I am... (14 Replies)
Discussion started by: CAch
14 Replies

4. Shell Programming and Scripting

copy data from different file with some same column

I have file1 have below data ABCDE2012 ABCDE2012120 -099.8 -099.4 00.4 ABCDE2012 ABCDE2012124 -104.6 -103.6 01.0 ABCDE2012 ABCDE2012128 -104.4 -103.1 01.4 file2 ABCDE2012 ABCDE2012120 15.4 ABCDE2012 ABCDE2012124 18.5 ABCDE2012 ABCDE2012128 20.1 ABCDE2012 ABCDE2012122 0.5 ... (1 Reply)
Discussion started by: pareshkp
1 Replies

5. Shell Programming and Scripting

Copy a column and paste to other file question

Please help me. This is simple, but urgent problem for me. :( I have a two files file1 1 2 3 4 5 6 1 2 3 4 5 6 1 2 3 4 5 6 ..... file2 11 12 13 14 15 11 12 13 14 15 11 12 13 14 15 ..... 1) I hope to make a new file, file 3, that consists of 2nd... (2 Replies)
Discussion started by: exsonic
2 Replies

6. UNIX for Advanced & Expert Users

Copy a column to another column in UNIX fixedwidth file

Hi All, I have a fixedwidth file of length 3000. Now i want to copy a column of 4 chars i.e( length 1678-1681) to column 1127 – 1171 to the same file. Please let me know how can i achive using a single command in fixed width file. Also source column length is 4 chars and target column length... (4 Replies)
Discussion started by: kiranparsha
4 Replies

7. Shell Programming and Scripting

Copy same name data from other file base on column

HI I have input file A.txt X Y Z File B.txt 1 X 10 AAA 11123 2 Y 22 PlD 4563 3 Z 55 PlD 54645 4 Z 66 PlD 15698 5 F 44 PlD 154798 6 C 55 PlD 12554 7 Z 88 PlD 23265 8 C 99 PlD 151654 9 C 11 PlD 21546546 I need New File C.txt (1 Reply)
Discussion started by: pareshkp
1 Replies

8. Shell Programming and Scripting

Locate the files in the first column and copy the files in 2nd column

#cat data.txt file1 folder1 file2 thisforfile2 file3 thisfolderforfile3 lata4 folder4 step 1: create the folder first in column 2 for i in `awk '{print $2}' data.txt` do mkdir /home/data/$i done step 2: locate the files in column1 and stored them into a file for i in... (17 Replies)
Discussion started by: kenshinhimura
17 Replies

9. UNIX for Beginners Questions & Answers

Select and copy .csv files based on row and column number

Dear UNIX experts, I'm a command line novice working on a Macintosh computer (Bash shell) and have neither found advice that is pertinent to my problem on the internet nor in this forum. I have hundreds of .csv files in a directory. Now I would like to copy the subset of files that contains... (8 Replies)
Discussion started by: rcsapo
8 Replies

10. UNIX for Beginners Questions & Answers

How to copy a column of multiple files and paste into new excel file (next to column)?

I have data of an excel files as given below, file1 org1_1 1 1 2.5 100 org1_2 1 2 5.5 98 org1_3 1 3 7.2 88 file2 org2_1 1 1 2.5 100 org2_2 1 2 5.5 56 org2_3 1 3 7.2 70 I have multiple excel files as above shown. I have to copy column 1, column 4 and paste into a new excel file as... (26 Replies)
Discussion started by: dineshkumarsrk
26 Replies
NIP2(1) 						      General Commands Manual							   NIP2(1)

NAME
nip2 - image processing with the VIPS library SYNOPSIS
nip2 [filename1 ...] nip2 -s filename [arg1 ...] nip2 -e expression [arg1 ...] DESCRIPTION
nip2 (for New Image Processing) is a tool for manipulating images using the VIPS image processing library. There are three principal modes: nip2 [filename1 ...] start in GUI mode, loading the named files nip2 -e expression [arg1 ...] nip2 --expression=EXPRESSION [arg1 ...] start in no-GUI mode; set main = expression, set list argv to ["filename", "arg1", "arg2", ...], set argc to length of list; print the value of symbol "main" to stdout; exit nip2 -s filename [arg1 ...] nip2 --script=FILENAME [arg1 ...] start in no-GUI mode; read in filename as a set of definitions, set list argv to ["filename", "arg1", "arg2", ...], set argc to length of list; print the value of symbol "main" to stdout; exit; useful for running nip2 as an interpreter on unix You can use -o to direct output to a file rather than stdout. -o filename --output=FILENAME the value of main is written to the named file. If main is a list, the filename is incremented between objects. You can use the suffix to specify the format and options to write in Other options provide finer control over startup and shutdown. If you need to do something strange, don't use -e/-s, use these in combina- tion. -b --batch batch (ie. non-GUI) mode -m --no-load-menus don't load menus, for faster startup -a --no-load-args don't load extra command-line arguments -w --stdin-ws load stdin as a workspace -d --stdin-def load stdin as a set of definitions -p --print-main print the value of main on exit. nip2 will check for a top-level symbol called main, and also check each workspace for a main Finally some other options are useful for debugging, timing and for generating strings for internationalisation. -V --verbose produce verbose error messages: handy for debugging in batch mode -i --i18n output strings from .def files for internationalisation -v --version print version information -c --benchmark benchmark: no GUI, just start up and shut down -t --time-save time saves: after every image save a popup tells you the time the save took in seconds -T --test test: start up (including any arg processing), test for any errors, and exit with an error code if any occured. Useful for running automated tests. -x PREFIX --prefix=PREFIX set install prefix: start up as if nip2 had been installed to PREFIX. Useful for running automated tests without installing the thing. EXAMPLES
nip2 fred.jpg Start nip2, loading fred.jpg. nip2 -e "2 + 2" Prints 4 to stdout. nip2 -e "99 + Image_file argv?1" -o result.png fred.jpg Load argv1 (fred.jpg), add 99, output to result.png. nip2 -e "Matrix [[1,2],[4,5]] ** -1" -o poop.mat Invert the 2x2 matrix and write the result to poop.mat. COPYRIGHT
2008 (c) Imperial College, London Oct 4 2004 NIP2(1)
All times are GMT -4. The time now is 01:14 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy