Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Concatenate date to file name Post 15455 by Cameron on Thursday 14th of February 2002 08:42:06 AM
Old 02-14-2002
sierra_aar,
thekids was logically correct but in the syntax used forgot the single quote's(') around the date para's.
An oversight that anyone could make.
Otherwise, glad I could help out.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

file Concatenate

Hi All, I have a question about file concatenate on unix. I have two file 1 of them like aaa,bbb,ccc,ddd other one is eee,fff,ggg,hhh I want to concatenate those file like this position aaa,bbb,ccc,ddd,eee,fff,ggg,hhh how can I do this ?? thanks. Alice (3 Replies)
Discussion started by: alisev
3 Replies

2. UNIX for Dummies Questions & Answers

sort by date and concatenate first three

Hi: I am trying to create some script that sorts the files in a subdirectory by date and concatenates the thre most recently created files. SAy, file1 date1 file2 date2 file3 date3 file4 date4 file5 date5 file6 date6 i only want to concatenate the first three which are the most... (4 Replies)
Discussion started by: jlarios
4 Replies

3. Shell Programming and Scripting

concatenate files sorted by date

I am a beginner in script writing, i tried to do the following I have a set of files sorted by date in the format YYMMDD.s and .x and .r I need to concatenate a header file to these sets of files so I used the following code echo "enter Swath number" read s echo "please enter first date and... (2 Replies)
Discussion started by: docaia
2 Replies

4. Shell Programming and Scripting

Insert file names when concatenate files into a file

Hi I found the following line would concatenate all test_01 test_02 test_03 files into "bigfile". cat test_* >> bigfile But, what I'm looking for a way to insert each file names in order when concatenated in "bigfile". Thank you samky2005 (2 Replies)
Discussion started by: samky2005
2 Replies

5. Shell Programming and Scripting

Concatenate strings retrieved from a file and write it into another file

Hi, I have a file files.txt containing data as below: abc;xyz uvw;pqr 123;456 I want to develop strings like below using the above data and write them into another file: www/xxx/abc/yyy/xyz www/xxx/uvw/yyy/pqr www/xxx/123/yyy/456 All this needs to be done through .sh file. ... (4 Replies)
Discussion started by: archana.n
4 Replies

6. Programming

Concatenate two lines in a fIle

Hi All, Can any one help me in finding the solution for concatenating two or more lines in a file and writing them to a temporary file. for Example: He is a wise student. So he got first rank. This is in a file i want the output as He is a wise student so he got first rank. into a file... (3 Replies)
Discussion started by: uday.sena.m
3 Replies

7. Shell Programming and Scripting

concatenate multiple file

Hi Need some help to concatenate files I have multiple spool files nearlly 15 of them which I need to concatenate like as shown in the below example for ex. file1.txt aaaa|bbbbb|cccc| dddd|eeee|ffff| kkkkk|uuuuu|gggg| file2.txt xxxx|yyyy|zzzz| 1111||kkkk|lllll... (2 Replies)
Discussion started by: rashmisb
2 Replies

8. Shell Programming and Scripting

Concatenate many files which contents the same date as part of name file

Gents, I have lot of files in a folder where each file name includes the date of generation, then I would like to merge all the files for each date in a complete file. list of files in forder. dsd01_121104.txt dsd01_121105.txt dsd01_121106.txt dsd03_121104.txt dsd03_121105.txt... (7 Replies)
Discussion started by: jiam912
7 Replies

9. Shell Programming and Scripting

Concatenate two columns in a file

Hi i am having one requirement like to concatenate two columns in to one columns, can any one help on this please sample scenario i am placing below COL1,COL2,COL3,COL4 1,A,B,C,D 2,e,f,g,h ouput should be 3 columns like below. COL1,COL2,newcolumns 1,A,B,CD 2,e,f,gh ... (9 Replies)
Discussion started by: bhaskar v
9 Replies

10. Shell Programming and Scripting

Concatenate text file

I have a text file in the below format: chr1 10002681 10002826 LZIC chr1 10002980 10003083 NMNAT1 chr1 10003485 10003573 NMNAT1 chr1 100111430 100111918 PALMD chr1 100127874 100127955 PALMD chr1 100133197 100133322 PALMD chr1 100152231 100152346 PALMD chr1 100152485 100152519 PALMD... (8 Replies)
Discussion started by: cmccabe
8 Replies
XML_GREP(1)						User Contributed Perl Documentation					       XML_GREP(1)

NAME
xml_grep - grep XML files looking for specific elements SYNOPSYS
xml_grep [options] <file list> or xml_grep <xpath expression> <file list> By default you can just give "xml_grep" an XPath expression and a list of files, and get an XML file with the result. This is equivalent to writing xml_grep --group_by_file file --pretty_print indented --cond <file list> OPTIONS
--help brief help message --man full documentation --Version display the tool version --root <cond> look for and return xml chunks matching <cond> if neither "--root" nor "--file" are used then the element(s) that trigger the "--cond" option is (are) used. If "--cond" is not used then all elements matching the <cond> are returned several "--root" can be provided --cond <cond> return the chunks (or file names) only if they contain elements matching <cond> several "--cond" can be provided (in which case they are OR'ed) --files return only file names (do not generate an XML output) usage of this option precludes using any of the options that define the XML output: "--roots", "--encoding", "--wrap", "--group_by_file" or "--pretty_print" --count return only the number of matches in each file usage of this option precludes using any of the options that define the XML output: "--roots", "--encoding", "--wrap", "--group_by_file" or "--pretty_print" --strict without this option parsing errors are reported to STDOUT and the file skipped --date when on (by default) the wrapping element get a "date" attribute that gives the date the tool was run. with "--nodate" this attribute is not added, which can be useful if you need to compare 2 runs. --encoding <enc> encoding of the xml output (utf-8 by default) --nb_results <nb> output only <nb> results --by_file output only <nb> results by file --wrap <tag> wrap the xml result in the provided tag (defaults to 'xml_grep') If wrap is set to an empty string ("--wrap ''") then the xml result is not wrapped at all. --nowrap same as using "--wrap ''": the xml result is not wrapped. --descr <string> attributes of the wrap tag (defaults to "version="<VERSION>" date="<date>"") --group_by_file <optional_tag> wrap results for each files into a separate element. By default that element is named "file". It has an attribute named "filename" that gives the name of the file. the short version of this option is -g --exclude <condition> same as using "-v" in grep: the elements that match the condition are excluded from the result, the input file(s) is (are) otherwise unchanged the short form of this option is -v --pretty_print <optional_style> pretty print the output using XML::Twig styles ('"indented"', '"record"' or '"record_c"' are probably what you are looking for) if the option is used but no style is given then '"indented"' is used short form for this argument is -s --text_only Displays the text of the results, one by line. --html Allow HTML input, files are converted using HTML::TreeBuilder --Tidy Allow HTML input, files are converted using HTML::Tidy Condition Syntax <cond> is an XPath-like expression as allowed by XML::Twig to trigger handlers. exemples: 'para' 'para[@compact="compact"]' '*[@urgent]' '*[@urgent="1"]' 'para[string()="WARNING"]' see XML::Twig for a more complete description of the <cond> syntax options are processedby Getopt::Long so they can start with '-' or '--' and can be abbreviated ("-r" instead of "--root" for example) DESCRIPTION
xml_grep does a grep on XML files. Instead of using regular expressions it uses XPath expressions (in fact the subset of XPath supported by XML::Twig) the results can be the names of the files or XML elements containing matching elements. SEE ALSO
XML::Twig Getopt::Long LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. AUTHOR
Michel Rodriguez <mirod@xmltwig.com> perl v5.16.3 2012-05-17 XML_GREP(1)
All times are GMT -4. The time now is 02:31 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy