process mutliple files in the same directory


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers process mutliple files in the same directory
# 1  
Old 05-12-2008
CPU & Memory process mutliple files in the same directory

I have over 900 files that have the same name except for a unique numeric assignment. For all files I would like to cut the 2nd column and paste all into one new file. All in bash.
sample input format for each file:
1 2 3
1 2 3
1 2 3

sample command for what I want to do:
cut -d' ' -f2 file_in >> file_out

Ultimately I would like process the files through a loop.

Thanks in advance!!!
# 2  
Old 05-12-2008
It's against the rules to double posts questions, proceed here:

https://www.unix.com/shell-programmin...#post302194256

Thread closed.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Directory containing files,Print names of the files in the directory that are exactly same content.

Given a directory containing say a few thousand files, please output a list of all the names of the files in the directory that are exactly the same, i.e. have the same contents. func(a_directory_name) output -> {“matches”: , ... ]} e.g. func(“/home/my/files”) where the directory... (7 Replies)
Discussion started by: anuragpgtgerman
7 Replies

2. Shell Programming and Scripting

Load mutliple files into Netezza table

Hi All, I get ~1000 files everyday and the current unix script process one file at a time... like it unzips the file, loads into table . This process will repeat how many ever files were present in the directory. I was wondering can we process multiple files (like unzipping and loading X amount... (1 Reply)
Discussion started by: rajasony
1 Replies

3. Shell Programming and Scripting

Process files in a directory and move them

I have a directory e2e_ms_xfer/cent01 this contains the multiple files some of which will be named below with unique date time stamps e2e_ms_edd_nom_CCYYMMDD_HHMM.csv What I want to do is in a loop 1) Get the oldest file 2) Rename 3) Move it up one level from e2e_ms_xfer/cent01 to... (1 Reply)
Discussion started by: andymay
1 Replies

4. Shell Programming and Scripting

delete all lines with string, process all files in directory

Simply, I have a directory of text files and I need to delete every line in every file containing a specific string. I want to write the modified files to an empty sub directory. I can't seem to get the sed command to delete the lines containing the string, and not just the string, in other... (3 Replies)
Discussion started by: LMHmedchem
3 Replies

5. Shell Programming and Scripting

Problem with mutliple sed

Hi I'm working on a file which looks like: 00001| |XXX|ABCD|27-SEP-1983|31-DEC-2099|Name|00001|N| |31|L| | | | |25-AUG-1990 I need to change the date format from DD-MMM-YYYY to MM/DD/YYYY So i using cat <filename> | sed... (2 Replies)
Discussion started by: Alim
2 Replies

6. Shell Programming and Scripting

Need help on Mulitple files mutliple actions

Hi all, I have mistkanely gzipped twice an entire folder and sub folders, and also renamed the files during that process. I am trying to undo this, and I need help to create the batch to work on it. All folders are under my images directory, I have a output.txt file that holds all the... (1 Reply)
Discussion started by: saariko
1 Replies

7. Shell Programming and Scripting

mutliple files in the same directory

I have over 900 files that have the same name except for a unique numeric assignment. For all files I would like to cut the 2nd column and paste all into one new file. All in bash. sample input format for each file: 1 2 3 1 2 3 1 2 3 sample command for what I want to do: cut -d' ' -f2... (8 Replies)
Discussion started by: epi8
8 Replies

8. UNIX for Dummies Questions & Answers

Please Help:Need to Split the file into mutliple files depends on the KEY field value

Hi Gurus, I am new to UNIX(HP). my requirmnet is File needs to needs to be split into multiple files dependa on one key value. example 1 abc 333 us 2 bbc 444 ch 5 nnn 333 kk 7 hhh 555 ll 3 hhh 333 hh now the requirment is line with 333 should be copied into test1.txt and... (14 Replies)
Discussion started by: arund_01
14 Replies

9. AIX

loop through the directory for files and sort by date and process the first file

hello i have a requirement where i have a direcotry in which i get files in the format STOCKS.20080114.dat STOCKS.20080115.dat STOCKS.20080117.dat STOCKS.20080118.dat i need to loop through the directory and sort by create date descending order and i need to process the first file. ... (1 Reply)
Discussion started by: dsdev_123
1 Replies

10. UNIX for Dummies Questions & Answers

rouge process wiping files from a directory

I'm hoping you guys (the experts) can help me. We have a sweep directory (/opt/application/sweep) critical to our application process. The application will lay down a file in that directory, then about 15 seconds later a post process will come along and pick that file up and continue processing.... (2 Replies)
Discussion started by: hedrict
2 Replies
Login or Register to Ask a Question