Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Get List of Unique File Names Post 302409808 by rjulich on Friday 2nd of April 2010 04:09:09 PM
Old 04-02-2010
anbu23,

Thank you, that first command was the one I was looking for. That second command will also come in handy.

Smilie Ray
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Help with list of latest file names

Hi Gurus, I need to list only those files which are most recent and the latest log file. For example if I have the following file list: JOB001.LOG_00uv02_00006 - Jul 7 12:16 JOB001.LOG_00vi0t_00001 - Aug 4 21:58 JOB001.LOG_00vi0t_00002 - Aug 5 09:15 JOB001.LOG_00vi0t_00003 - Aug 5... (6 Replies)
Discussion started by: shash
6 Replies

2. Shell Programming and Scripting

List of file names

I have the following list of file names stored in $fnames, so that if I do foreach f ($fnames) echo "$f" end I will get n02-z30-sr65-rgdt0p50-dc0p002-16x12drw-run1 n02-z30-sr65-rgdt0p50-dc0p002-16x12drw-run2 n02-z30-sr65-rgdt0p50-dc0p002-16x12drw-run3... (3 Replies)
Discussion started by: kristinu
3 Replies

3. Shell Programming and Scripting

get file names from the list

Hi Experts, Here is my scenario: Am maintaining a file which has list of logs with complete path and file names like bleow a/b/c/Daily/file1_20111012.log d/e/f/Monthly/file1_20111001.log g/h/Daily/file1_20110120.log i/Daily/file1_20110220.log How to copy the file names frm the list... (7 Replies)
Discussion started by: laxm
7 Replies

4. Shell Programming and Scripting

List unique values and count instances in .csv file

I need to take the second column of a .csv file and count the number of instances of each unique value in that same second column. I'd like the output to be value,count sorted by most instances. Thanks for any guidance! Data example: 317476,317756,0 816063,318861,0 313123,319091,0... (4 Replies)
Discussion started by: batcho
4 Replies

5. Shell Programming and Scripting

Change unique file names into new unique filenames

I have 84 files with the following names splitseqs.1, spliseqs.2 etc. and I want to change the .number to a unique filename. E.g. change splitseqs.1 into splitseqs.7114_1#24 and change spliseqs.2 into splitseqs.7067_2#4 So all the current file names are unique, so are the new file names.... (1 Reply)
Discussion started by: avonm
1 Replies

6. Shell Programming and Scripting

How to get the dates from a list of file names?

Hi All, I have a .txt file with the list of filenames as given below. /dev_data/dev3/ctl/20120622_Employee.txt /dev_data/dev3/ctl/20120623_Employee.txt /dev_data/dev3/ctl/20120624_Employee.txt I want to read this file & write the dates alone from the filenames into a .done file. ... (6 Replies)
Discussion started by: dsfreddie
6 Replies

7. Shell Programming and Scripting

List the file names that differ

Hello, I have two directories - prev and current . They both have same multiple subdirectories and files. Now the current directory can have some updated files and some new files added that is not in prev. I want to find the list of file names that differ. I am doing this because i can not... (2 Replies)
Discussion started by: jakSun8
2 Replies

8. UNIX for Dummies Questions & Answers

List Directory names which have the file

Hi All, Can any one help me to list out the directory names which contain the specified file. See for example File name : file.201307014.LKT Have the directory structure as below. /app/work/data/INDIA/file.201307014.LKT /app/work/data/AMERICA/file.201307014.KTP... (5 Replies)
Discussion started by: Balasankar
5 Replies

9. Shell Programming and Scripting

Discover unique names and organize

I'm attempting to write a script that will look into a directory, discover all unique names, create directories for their prefix names and place the files inside. I do this now one by one with a simple script but I'd like to automate the process. The directory would contain something like: ... (6 Replies)
Discussion started by: scribling
6 Replies

10. UNIX for Beginners Questions & Answers

sed awk: split a large file to unique file names

Dear Users, Appreciate your help if you could help me with splitting a large file > 1 million lines with sed or awk. below is the text in the file input file.txt scaffold1 928 929 C/T + scaffold1 942 943 G/C + scaffold1 959 960 C/T +... (6 Replies)
Discussion started by: kapr0001
6 Replies
WWW::Mechanize::Cookbook(3pm)				User Contributed Perl Documentation			     WWW::Mechanize::Cookbook(3pm)

NAME
WWW::Mechanize::Cookbook - Recipes for using WWW::Mechanize INTRODUCTION
First, please note that many of these are possible just using LWP::UserAgent. Since "WWW::Mechanize" is a subclass of LWP::UserAgent, whatever works on "LWP::UserAgent" should work on "WWW::Mechanize". See the lwpcook man page included with the libwww-perl distribution. BASICS
Launch the WWW::Mechanize browser use WWW::Mechanize; my $mech = WWW::Mechanize->new( autocheck => 1 ); The "autocheck => 1" tells Mechanize to die if any IO fails, so you don't have to manually check. It's easier that way. If you want to do your own error checking, leave it out. Fetch a page $mech->get( "http://search.cpan.org" ); print $mech->content; "$mech->content" contains the raw HTML from the web page. It is not parsed or handled in any way, at least through the "content" method. Fetch a page into a file Sometimes you want to dump your results directly into a file. For example, there's no reason to read a JPEG into memory if you're only going to write it out immediately. This can also help with memory issues on large files. $mech->get( "http://www.cpan.org/src/stable.tar.gz", ":content_file" => "stable.tar.gz" ); Fetch a password-protected page Generally, just call "credentials" before fetching the page. $mech->credentials( 'admin' => 'password' ); $mech->get( 'http://10.11.12.13/password.html' ); print $mech->content(); LINKS
Find all image links Find all links that point to a JPEG, GIF or PNG. my @links = $mech->find_all_links( tag => "a", url_regex => qr/.(jpe?g|gif|png)$/i ); Find all download links Find all links that have the word "download" in them. my @links = $mech->find_all_links( tag => "a", text_regex => qr/download/i ); APPLICATIONS
Check all pages on a web site Use Abe Timmerman's WWW::CheckSite http://search.cpan.org/dist/WWW-CheckSite/ <http://search.cpan.org/dist/WWW-CheckSite/> SEE ALSO
WWW::Mechanize AUTHORS
Copyright 2005-2010 Andy Lester "<andy@petdance.com>" Later contributions by Peter Scott, Mark Stosberg and others. See Acknowledgements section in WWW::Mechanize for more. perl v5.14.2 2011-08-05 WWW::Mechanize::Cookbook(3pm)
All times are GMT -4. The time now is 03:26 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy