How to process multiple input files using Shell scripting


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to process multiple input files using Shell scripting
# 1  
Old 09-27-2011
How to process multiple input files using Shell scripting

Hi,
I would like to write a for loop that does the following:

I have a file called X.txt and other files called 1.txt,2.txt, .....,1000.txt.

I want to substitute the 6th column of the file X.txt with 1.txt and store the output as X.1. Then I want to do the same with X.txt and 2.txt and store the output as X.2 and so on all the way up to 1000.txt.

How do I write a for loop that achieves that? Thank you! Smilie

Last edited by jim mcnamara; 09-27-2011 at 03:40 PM.. Reason: Closed: duplicate thread.
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Export Oracle multiple tables to multiple csv files using UNIX shell scripting

Hello All, just wanted to export multiple tables from oracle sql using unix shell script to csv file and the below code is exporting only the first table. Can you please suggest why? or any better idea? export FILE="/abc/autom/file/geo_JOB.csv" Export= `sqlplus -s dev01/password@dEV3... (16 Replies)
Discussion started by: Hope
16 Replies

2. Shell Programming and Scripting

Shell Scripting - Select multiple files from numbered list

I am trying to have the user select two files from a numbered list which will eventually be turned into a variable then combined. This is probably something simple and stupid that I am doing. clear echo "Please Select the Show interface status file" select FILE1 in *; echo "Please Select the... (3 Replies)
Discussion started by: dis0wned
3 Replies

3. Shell Programming and Scripting

awk, multiple files input and multiple files output

Hi! I'm new in awk and I need some help. I have a folder with a lot of files and I need that awk do something in each file and print a new file with the output. The input file name should be modified when I print the outpu files. Thanks in advance for help! :-) ciao (5 Replies)
Discussion started by: gabrysfe
5 Replies

4. UNIX for Dummies Questions & Answers

Writing a loop to process multiple input files by a shell script

I have multiple input files that I want to manipulate using a shell script. The files are called 250.1 through 250.1000 but I only want the script to manipulate 250.300 through 250.1000. Before I was using the following script to manipulate the text files: for i in 250.*; do || awk... (4 Replies)
Discussion started by: evelibertine
4 Replies

5. Shell Programming and Scripting

How to Process input files from folder in shell script?

Hi, I want to process all input files available into folder (C:\ShellPrg\InputFile\) Input files are abc.CSV , XYZ.zip (zip of CSV file), PQR.gz (zip of CSV file). I want to check the extension of file, If its .zip/.gz then need to unzip the file as .CSV I want to parse line by line of... (2 Replies)
Discussion started by: Poonamol
2 Replies

6. Shell Programming and Scripting

Background Process Shell Scripting

I have a following program: echofunc() { filename=$1 echo "reading $filename" while read line do echo $line; sleep 6; done < $filename } split -5 new.dat ls x* > input.dat while read file do echofun $file & done < input.dat (3 Replies)
Discussion started by: dhieraj
3 Replies

7. Shell Programming and Scripting

How to process multiple files in Korn Shell

How do I make the below ksh to process all of the files inside a user specified directory? Currently it can only process one file at a time. #!/bin/ksh tr -s '\11 ' ' ' < $1 > temp0 sed -e 's/,//g' temp0 > temp1 cut -d' ' -f1,4,5 temp1 > final_output rm temp0 temp1 (3 Replies)
Discussion started by: stevefox
3 Replies
Login or Register to Ask a Question
FLARE(6)							 flare User Manual							  FLARE(6)

NAME
flare - diablo like rpg game DESCRIPTION
This manual page documents briefly the game flare and the files it uses. flare is a diablo like rpg game. FILES
settings.txt flare does not have a settings dialogue yet. You can manipulate flare's settings in the settings.txt instead. It is located in one of the following paths: $XDG_CONFIG_HOME/flare $HOME/.config/flare ./config keybindings.txt You can manipulate flare's default key bindings in this file. It is located in one of the following paths: $XDG_CONFIG_HOME/flare $HOME/.config/flare ./config save[0-9]{?}.txt Savegames are simple txt files in flare. You can find them at one of these places: $XDG_DATA_HOME/flare $HOME/.local/share/flare ./saves If permissions are correct, the game is automatically saved when you exit. ENVIONMENT
XDG_CONFIG_HOME, $XDG_DATA_HOME flare follows the XDG stanard, see FILES section above. BUGS
If you should find a bug in flare, please report it at the official BTS at: https://github.com/clintbellanger/flare/issues. AUTHOR
Jan-Hendrik Peters <hennr@hennr.name> Wrote this manpage for the Debian system. COPYRIGHT
Copyright (C) 2011 Jan-Hendrik Peters This manual page was written for the Debian system (and may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 3 or (at your option) any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. flare 12/26/2011 FLARE(6)