10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'm writing a Perl script which has its 1st step as to copy files from one directory to another directory. The Source directory has got files with extension, without extension, directories etc. But I want to copy ONLY files with no extension. The files with extensions and directories should not get... (2 Replies)
Discussion started by: jhamaks
2 Replies
2. Shell Programming and Scripting
In linux.. In a directory there are 3 files which I want to copy only the latest file (ls -ltr myfiles*.txt|tail -1) to other directory in perl?
Could anyone please help me with the code?
Regards,
J (1 Reply)
Discussion started by: scriptscript
1 Replies
3. Shell Programming and Scripting
Hello friends,
i have a perl script as below ...
for (0 ..$#values)
{
##want to print some message here in Report.txt file
print `find /abc/xyz/pqr/$values" -type f -ls` >> Report.txt
}
I am able to get output of print `find /abc/xyz/pqr/$values" -type f -ls` >> Report.txt
in... (2 Replies)
Discussion started by: harpal singh
2 Replies
4. UNIX for Dummies Questions & Answers
Hi I need to open a file if a condition(for example a if a regular expression) is met. How do i do this ?
open (file) if (some regex)..... (3 Replies)
Discussion started by: manutd
3 Replies
5. Shell Programming and Scripting
I'd like to grep files for key words using korn shell, and compile the actual contents (not just file name) of those files that contain a combination of those grepped key words into one repository file for reference. However, I'm stuck at the combining part. Here's what I have thus far:
egrep... (5 Replies)
Discussion started by: drumminfool91
5 Replies
6. Shell Programming and Scripting
I developed a perl code..And the excerpt from it is given below...
open(HANDLE,$cmp_path) ; #reading the xml file from the file path
while($file_path = <HANDLE>)
I have list of XML files to read from a folder. It has some spaces inside the name of the file...I used "\"... (2 Replies)
Discussion started by: gameboy87
2 Replies
7. Shell Programming and Scripting
Hi All,
I have a total of ten file to open in the Perl script and i am using a for loop to open each file and capture some strings inside each file.
Unfortunately, i encounter the below syntax error.
I think there should be something wrong with this term reports_${counting}_${_}.txt but i do... (4 Replies)
Discussion started by: Raynon
4 Replies
8. Shell Programming and Scripting
Hi All,
I need some expert help in performing the following in Perl.
I have a code below but it doesn;t seem to work. Can any expert give me some advice?
Below are the requirements
1) Open numerous files assigned to an array @FILES. Note that the files are always named with the term... (7 Replies)
Discussion started by: Raynon
7 Replies
9. Shell Programming and Scripting
Folks, here is my code:
I am a serious newbie, why doesn't this make copies of my files? I dont get any errors, the files are just not created.
Your help is appreciated
#!/usr/bin/perl
use File::Copy;
$PWD = `pwd`;
$REPORTDIR = "/usr/local/tripwire/tfs/report";
chdir $REPORTDIR;... (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies
10. UNIX for Dummies Questions & Answers
How do I copy one file from one unix file to another??? I'm new at this, please help.. (3 Replies)
Discussion started by: Tevin
3 Replies