10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
I have 100 files under file A labled 1.txt 2.txt.....100.txt(made up name)
I have 1 files under file B labled name.txt
How can i run the same perl script on 100 files and file name.txt
I want to run
perl script.pl A/1.txt B/name.txt
perl script.pl A/2.txt B/name.txt
.......
perl... (3 Replies)
Discussion started by: grace_shen
3 Replies
2. UNIX for Dummies Questions & Answers
Hi
I have 1000 files labelled data1.txt through data1000.txt. I want to write a script that prints out the number of lines in each txt file and outputs it in the following format:
Column 1: number of data file (1 through 1000)
Column 2: number of lines in the text file
Thanks! (2 Replies)
Discussion started by: evelibertine
2 Replies
3. Shell Programming and Scripting
I am new for Perl I want to ask one question. I have around 50 custom packages which i am using in my Perl script. I want to import all .pm packages in my Perl script in an easy way. Right now i have to import each package individually. So Is there any way to do so??
Right Now i am doing like:
... (1 Reply)
Discussion started by: Navrattan Bansa
1 Replies
4. UNIX for Dummies Questions & Answers
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. UNIX for Dummies Questions & Answers
I have a script where the the 9th line looks like this:
$filename=sprintf("250.1chr%d.ped", $N);
I want to modify this script 1000 times, changing 250.1chr%d.ped to 250.2chr%d.ped, 250.3chr%.ped.......and so on all the way to 250.1000chr%d.ped and store each output in files called
... (4 Replies)
Discussion started by: evelibertine
4 Replies
6. UNIX for Dummies Questions & Answers
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... (1 Reply)
Discussion started by: evelibertine
1 Replies
7. Shell Programming and Scripting
Hi,
I want to run a Perl script on multiple files, with same name ("Data.txt") but in different directories (eg : 2010_06_09_A/Data.txt, 2010_06_09_B/Data.txt).
I know how to run this perl script on files in the same directory like:
for $i in *.txt
do
perl myscript.pl $i > $i.new... (8 Replies)
Discussion started by: ad23
8 Replies
8. Shell Programming and Scripting
I have a script that runs on one file (at a time).
like this:
$> perl myscript.pl filename > output
How can I run it on >6000 files and have the output sent out into slightly modified file name
$> perl myscript 6000files> output6000files.new extension
Thanks in anticipation (4 Replies)
Discussion started by: aritakum
4 Replies
9. Shell Programming and Scripting
Hi All,
I have encountered a problem,please help me.
I have a script in which multiple processes are writing on to the same file .
How should I stop this , I mean lock mechanism can be implemented or we can write the at different files and then concatenate the files.
What would be a better... (1 Reply)
Discussion started by: Sayantan
1 Replies
10. Shell Programming and Scripting
All,
I want to combine multiple files in one file.
Something like what we do on the commad line as follows ->
cat file1 file2 file3 > Main_File.
Can something like this be done in a perl script very efficiently?
Thanks,
Rahul. (1 Reply)
Discussion started by: rahulrathod
1 Replies