10-07-2003
Re: Re: Perl: Filename expansion?
Quote:
[i]Originally posted by k
[B]Therefore, you simply need to assign @array to @ARGV
I think you mean to assign @ARGV to @array, not the other way round otherwise you destroyed the things in @ARGV.
By the way, that's just pretty a rewrite of what I wrote just now.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I am facing a weird problem. I have got a directory structure copied from windows to Linux. Some of the folders are named like
/gfs/data/Dow Jones $5/ DJ FCBOT_O_tick_1998.zip
/gfs/data/Dow Jones $5/ DJ FCBOT_O_tick_2000.CSV
/gfs/data/Dow Jones... (6 Replies)
Discussion started by: mitrashatru
6 Replies
2. Shell Programming and Scripting
Can anybody let me know what following commands will do in perl
1.my $result = `/main/home/bin/iwex -l '$File1'`;
2.my $setcmd = "/main/home/bin/iwex -s \"$File2\" \"$File3\"";
where $File1 $File2 $File3 are regular files.
Please suggest something.
Ur welcome (4 Replies)
Discussion started by: millan
4 Replies
3. Shell Programming and Scripting
Hi ,
could anyone help me out with this problem.
sample.txt has this content :
u001- this is used for project1 ||
u002- this is used for p2|| not to be printed
u003- this is used
for project3 ||
u004- this is
used for p4 ||
u005- this is used for project5 ||
u006- this is used for p6... (9 Replies)
Discussion started by: Balaji PK
9 Replies
4. Shell Programming and Scripting
Hi all,
I have a list of xml file. I need to split the files to a different files when see the <ko> tag.
The list of filename are
B20090908.1100-20090908.1200_CDMA=1,NO=2,SITE=3.xml
B20090908.1200-20090908.1300_CDMA=1,NO=2,SITE=3.xml
B20090908.1300-20090908.1400_CDMA=1,NO=2,SITE=3.xml
... (3 Replies)
Discussion started by: natalie23
3 Replies
5. Shell Programming and Scripting
Scenario: Users drop files into a directory which is regularly polled by my PERL process. On detecting a file my process will move it from the poll dir to a working directory. A user created a file with a £ symbol in the filename and my process now fails.
e.g £££F3AERO££.txt
... (1 Reply)
Discussion started by: thefal9
1 Replies
6. Shell Programming and Scripting
i would like to know how to append current date in a filename with .tgz extension.
#!/usr/bin/perl
my $date = `date + %Y%m%d`;
system("sudo mv /tmp/nyucs01_config_backup.tgz /misc/nyucs01_config_backup_$date.tgz");
im getting this error message:
sh: line 1: .tgz: command not found (7 Replies)
Discussion started by: linuxgeek
7 Replies
7. Shell Programming and Scripting
In PERL script
I have few files named theme1.htm,theme2.htm,theme3.htm and so on.
now I need to write perl code to split the the filename and store only that particular digit.
Example
--------------
filename is theme1.htm
output should be 1
another example
---------------... (5 Replies)
Discussion started by: giridhar276
5 Replies
8. Shell Programming and Scripting
The following command to replace text in place in multiple files in a directory is tripping up on filename spaces (Windows environment). I really don't know Perl.
find '\\server\directory' | xargs perl -pi -e 's/textA/textB/g'Mike (2 Replies)
Discussion started by: Michael Stora
2 Replies
9. Shell Programming and Scripting
Hello,
I am trying to create a file in windows and i want the filename to have timestamp as well but something is wrong and i can not understand waht. The code that i use is the following
($cwkday,$cmonth,$cday,$ctime,$cyear) = split(/\s+/, localtime);
$current_date =... (5 Replies)
Discussion started by: chriss_58
5 Replies
10. Shell Programming and Scripting
Hello All,
Could you please do help me here as I would like to perform parameter expansion in shell over a parameter expansion.
Let's say I have following variable.
path="/var/talend/nat/cdc"
Now to get only nat I could do following.
path1="${path%/*}"
path1="${path1##*/}"
Here... (8 Replies)
Discussion started by: RavinderSingh13
8 Replies