10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Been a while since I futzed around with Perl, and came upon a minor headscratcher for the community ;)
Here's the basic code which I'm trying to make tick over:#!/usr/bin/perl
print " starting ";
while (-e "~/.somedir/testFile")... (9 Replies)
Discussion started by: LinQ
2. Shell Programming and Scripting
I'm trying to move/copy the files inside the loop into a directory .
I tried the below code and the issue is the data is not copying into the created directory but the files are copying into another file
... (3 Replies)
Discussion started by: smile689
3. Shell Programming and Scripting
I am trying to figure out a way to script copying specific files from one dir structure to another.
I have a dir structure like this:
dira/author 1/book 1/file a.epub
/book 2/file b.epub
/author 2/book 1/file c.epub
/author 3/book 1/file d.epub
/book 2/file... (2 Replies)
Discussion started by: arcanas
4. Shell Programming and Scripting
Good morning guys!!
Im still practicing with Perl and now Im trying to open a file, and copy its contents to another file. Them I want to remeove the information out of the orginal file after it is copied over.
The flow should be messages-->messages1-->messages2.
Kind of like a log... (1 Reply)
Discussion started by: bigben1220
5. Shell Programming and Scripting
I have one curious case. There are list of following files placed in one directory such as... And updated each month.
files.JAN09.csv files.FEB09.csv files.MAR09.csv .....
Now, I need to move a specific files; i.e,
For this month, I need to move only OCT09, NOV09, DEC09,... (1 Reply)
Discussion started by: Jerald Nathan
6. UNIX for Advanced & Expert Users
I am userB and have a dir
This dir is owned by me.
How do I recursively copy files from another users's dir userA?
I need to preserve the original user who created files, original group information, original create date, mod date etc.
cp -pr /home/userA/* .
... (2 Replies)
Discussion started by: Hangman2
7. Shell Programming and Scripting
I need to count files in a dir which were updated yesterday.
ls -lth | grep -i 'Jul 7' | wc -l
The dir holds files of last 15 days and total count is as 2067476.
Is it efficient to count the files using perl? I have developed the following perl script making use of system().
Can... (3 Replies)
Discussion started by: Asteroid
8. Shell Programming and Scripting
I'm new to shell scripting so I don't really understand what I'm doing wrong.
The script I'm trying to do saves all the files (*.c) on the current dir to a list and, one by one, copies them to a new one called Backup. The thing is, if there are already other versions of the files I'm... (6 Replies)
Discussion started by: G3nn
9. Shell Programming and Scripting
i have a script
find /tmp/Satya -type f | \
while read filename1
find /tmp/Satya -type f | \
while read filename2
if diff $filename1 $filename2
echo "Both files... (3 Replies)
Discussion started by: Satyak
10. 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
$PWD = `pwd`;
$REPORTDIR = "/usr/local/tripwire/tfs/report";
chdir $REPORTDIR;... (1 Reply)
Discussion started by: BG_JrAdmin