Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Comparing file names to text document Post 302280509 by gman on Tuesday 27th of January 2009 06:22:14 AM
Old 01-27-2009
Comparing file names to text document

Hi All,
I'm really new to Unix scripts and commands but i think i'm eventually getting the hang of some of it.
I have a task which is to create some kind of script which compares the file names in a directory, with the associated file name in a .txt file. We send out some data and Unix has a problem with mixed case file names so i want to run the scrip to compare them before it goes out.
Could anyone give me any hints on how to go about this?

The directory might contain
rivers.TAB
sea.TAB

and the txt file called usa.mdf may contain
<Table>rivers.tab</Table>

Therefore i want to highlight any differences in the 2. Would this be pretty difficult to do?
Many thanks for reading -
Gareth
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Replace variable names in text file with its value

Hi I have a text file (mytext.txt), the content of which is as following: My name is <@MY_NAME@> and my age is <@MY_AGE@> . Now i have another property file (myprops) which is as following: MY_NAME=abcdefgh MY_AGE=000000 I was wondering, how can i replace the tags of mytext.txt, with its... (1 Reply)
Discussion started by: vigithvg
1 Replies

2. Solaris

Copy and paste text from a word document into a txt file in vi

Hello, Can anybody please tell me how we can copy and paste text from a word document into a text file that we are editing in vi? Is it possible to do that while we are editing the text file in vi in insert mode? Thanks, (3 Replies)
Discussion started by: Pouchie1
3 Replies

3. Shell Programming and Scripting

Comparing and Formatting the text file

hi, I need a script which can format the below text file which contains comments file1.txt -------- //START //Name: some value //Date: //Changes:............. //..................... //END //START //Date: //Name: some value //Changes:............. //..................... (3 Replies)
Discussion started by: flamingo_l
3 Replies

4. Shell Programming and Scripting

Append text from one file to another based on a search from the end of a document

Hi all, I have output files that are all text files with various different extensions. So, if I submit the input file "job_name.inp", when it finishes I get an output file "job_name.dat". A typical input file looks something like this: $CONTRL SCFTYP=RHF RUNTYP=ENERGY MAXIT=199 MULT=1... (4 Replies)
Discussion started by: marcozd
4 Replies

5. UNIX Desktop Questions & Answers

COMPARING COLUMNS IN A TEXT FILE

Hi, Good day. I currently have this data called database.txt and I would like to check if there are no similar values (all unique) on an entire row considering the whole column data is unique. the data is as follows cL1 cL2 cL3 cL4 a12 c13 b13 c15 b11 a15 c19 b11 c15 c17 b13 f14 with... (1 Reply)
Discussion started by: whitecross
1 Replies

6. Shell Programming and Scripting

Grepping file names, comparing them to a directory of files, and moving them into a new directory

got it figured out :) (1 Reply)
Discussion started by: sHockz
1 Replies

7. Shell Programming and Scripting

Comparing File Names

Hi All , I am new to UNIX. I have a requirement where user transfers 10-15 files into a directory "/upload". File name will be like T1234_H and T1234_D or R1234_H and R1234_D . The _H and _D files are associated to each other.They must always be together in the server. Once the files are... (2 Replies)
Discussion started by: Raviteja_B
2 Replies

8. Shell Programming and Scripting

**URGENT ** : Comparing the pattern of the file names in 2 different directories

Hi, I have got a requirement for which i need your help. The following problem is required to get solved in PERL SCRIPT. Here is the requirement. There are 4 folders say SRC_DIR1, SRC_DIR2 and TGT_DIR_1,TGT_DIR_2 (Note: both path of SRC_DIR1 & SRC_DIR2 are different but both path of... (1 Reply)
Discussion started by: shadow_fawkes
1 Replies

9. Shell Programming and Scripting

Comparing the pattern of the file names in 2 different directories

Hi, I have got a requirement for which i need your help. The following problem is required to get solved in PERL SCRIPT. Here is the requirement. There are 4 folders say SRC_DIR1, SRC_DIR2 and TGT_DIR_1,TGT_DIR_2 (Note: both path of SRC_DIR1 & SRC_DIR2 are different but both path of... (4 Replies)
Discussion started by: shadow_fawkes
4 Replies

10. Shell Programming and Scripting

Comparing file names with different extensions

Hello, I need some help. I have files in one and the same directory, but with different extensions, like this: file1.IN file2.IN file3.IN file1.OUT file2.OUT Apparently some files with OUT extension can be missing. So I want to compare *.IN and *.OUT, ignoring the extension and get result... (3 Replies)
Discussion started by: apenkov
3 Replies
doctoc_lang_cmdref(n)						Documentation tools					     doctoc_lang_cmdref(n)

__________________________________________________________________________________________________________________________________________________

NAME
doctoc_lang_cmdref - doctoc language command reference SYNOPSIS
comment plaintext division_end division_start text ?symfile? include filename item lb rb toc_begin text title toc_end vset varname value vset varname _________________________________________________________________ DESCRIPTION
This document specifies both names and syntax of all the commands which together are the doctoc markup language, version 1. As this docu- ment is intended to be a reference the commands are listed in alphabetical order, and the descriptions are relatively short. A beginner should read the much more informally written doctoc language introduction first. COMMANDS
comment plaintext Toc markup. The argument text is marked up as a comment standing outside of the actual text of the document. Main use is in free- form text. division_end Toc structure. This command closes the division opened by the last division_begin command coming before it, and not yet closed. division_start text ?symfile? Toc structure. This command opens a division in the table of contents. Its counterpart is division_end. Together they allow a user to give a table of contents additional structure. The title of the new division is provided by the argument text. If the symbolic filename symfile is present then the section title should link to the referenced document, if links are supported by the output format. include filename Templating. The contents of the named file are interpreted as text written in the doctoc markup and processed in the place of the include command. The markup in the file has to be self-contained. It is not possible for a markup command to cross the file bound- aries. item Toc structure. This command adds an individual element to the table of contents. Each such element refers to a document. The docu- ment is specified through the symbolic name file. The text argument is used to label the reference, whereas the desc provides a short descriptive text of that document. The symbolic names are used to preserve the convertibility of this format to any output format. The actual name of the file will be inserted by the chosen formatting engine when converting the input. This will be based on a mapping from symbolic to actual names given to the engine. lb Text. The command is replaced with a left bracket. Use in free-form text. Required to avoid interpretation of a left bracket as the start of a markup command. Its usage is restricted to the arguments of other markup commands. rb Text. The command is replaced with a right bracket. Use in free-form text. Required to avoid interpretation of a right bracket as the end of a markup command. Its usage is restricted to the arguments of other commands. toc_begin text title Document structure. The command to start a table of contents. The arguments are a label for the whole group of documents the index refers to (text) and the overall title text for the index (title), without markup. The label often is the name of the package (or extension) the documents belong to. toc_end Document structure. Command to end a table of contents. Anything in the document coming after this command is in error. vset varname value Templating. In this form the command sets the named document variable to the specified value. It does not generate output. I.e. the command is replaced by the empty string. vset varname Templating. In this form the command is replaced by the value of the named document variable BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category doctools of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. SEE ALSO
doctoc_intro, doctoc_lang_faq, doctoc_lang_intro, doctoc_lang_syntax KEYWORDS
doctoc commands, doctoc language, doctoc markup, markup, semantic markup COPYRIGHT
Copyright (c) 2007 Andreas Kupries <andreas_kupries@users.sourceforge.net> doctools 1.0 doctoc_lang_cmdref(n)
All times are GMT -4. The time now is 10:13 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy