Sponsored Content
Top Forums Shell Programming and Scripting Concatenation of files with same naming patterns dynamically Post 302980167 by Don Cragun on Wednesday 24th of August 2016 05:12:03 PM
Old 08-24-2016
Hi Jesshelle,
It is great to know that vgersh99's suggestion "kinda worked", but it gives us absolutely no idea what part of it worked and what part of it did not work.

I have tried to get details from you about what you want done, but you did not answer those questions. Let me try once more:
  1. Are you trying to create one file containing all 120 daily reports or are you trying to create five files containing 24 daily reports in each file?
  2. What are the names of the files or what is the name of the file you want your script to create?
  3. Will the filename extensions of the input files always be CTLR, ACCD, BCCD, CCCD, and DDDD, or do the extensions vary from day to day?
  4. If there is one output file (instead of five), are the reports for each filename extension supposed to be grouped together or are the reports for each hour supposed to be grouped together? And, if they are grouped together by extension, does the order in which they appear in the output file matter? And, if so, what is the desired output order?
  5. Will you be running this script on the day the reports are being generated? And, if not, how will your script know what day's reports are to be processed?
  6. What are you using to read the daily report file(s)? Most UNIX system and UNIX-like system tools don't care about the filename extension when reading a text file.

Last edited by Don Cragun; 08-24-2016 at 06:13 PM.. Reason: Fix list.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Faster Concatenation of files

Dear All I am using cat command for concatenating multiple files. Some time i also use append command when there are few files. Is there faster way of concatenating multiple files(60 to 70 files) each of 156 MB or less/more.:) Thanx (1 Reply)
Discussion started by: tkbharani
1 Replies

2. Shell Programming and Scripting

rowwise concatenation of files

Hi , I am having a file 1n.txt - cat 1n.txt gives get_next_sp_fixing_mod_ref_no, get_next_sp_tran_ref_no, cat 2n.txt - boxer1.cpp boxer2.cpp I want a file resn.txt which has - get_next_sp_fixing_mod_ref_no,boxer1.cpp get_next_sp_tran_ref_no,boxer2.cpp How can i do that ? Its... (3 Replies)
Discussion started by: sid1582
3 Replies

3. UNIX for Dummies Questions & Answers

naming files that csplit creates

Hi, This is my first time on this forum.. I searched the previous answers, but didn't find the answer I was looking for at first glance. csplit works beautifully for me, except for one thing. My file looks like this: ad|name1|asdf...(several pages)..asdf ... ad|name2|asdf...(several... (8 Replies)
Discussion started by: juliette salexa
8 Replies

4. Shell Programming and Scripting

Removing Header from files before Concatenation

I need to concatenate the files of same type but with different names that conatin header. Before conactenating its mandatory to remove the header from the files .. and after concatenation the output file should contain header too. how to do it... thanks in advance. (4 Replies)
Discussion started by: amitpta
4 Replies

5. UNIX for Dummies Questions & Answers

naming files in awk

I have a whole directory and I need each lines of each file to be separated to a new file but I am facing problem naming them :( some of the files even might be empty the output files should be names original file name + the number of the line or any incremental number FILES="data/*" for X in... (12 Replies)
Discussion started by: A-V
12 Replies

6. Shell Programming and Scripting

Concatenation of two patterns

Read the lines from the file and concatenate the lines into single line then search the string "INPUT=" from the another file and if "INPUT" is present in that file assign the concatenate patterns into "INPUT=" pattern. example: file1.txt <some lines> INPUT = <some lines> file2.txt... (3 Replies)
Discussion started by: krsureshmca
3 Replies

7. UNIX Desktop Questions & Answers

Combining files with specific patterns of naming in a directory

Greetings Unix exports, I am facing some problems in combining files with different name patterns with a directory and I would appreciate if you can help me I have more than 1000 files but they follow a specific pattern of naming. e.g. 64Xtest01.txt They are divided into two sets of test and... (9 Replies)
Discussion started by: A-V
9 Replies

8. Shell Programming and Scripting

Issue in Concatenation/Joining of lines in a dynamically generated file

Hi, I have a file containing many records delimited by pipe (|). Each record should contain 17 columnns/fields. there are some fields having fields less than 17.So i am extracting those records to a file using the below command awk 'BEGIN {FS="|"} NF !=17 {print}' feedfile.txt... (8 Replies)
Discussion started by: TomG
8 Replies

9. UNIX and Linux Applications

Concatenation of different reports dynamically

Hi, I have the following reports that get generated every 1 hour and this is my requirement: 1. 5 reports get generated every hour with the names "Report.Dddmmyy.Thhmiss.CTLR" "Report.Dddmmyy.Thhmiss.ACCD" "Report.Dddmmyy.Thhmiss.BCCD" "Report.Dddmmyy.Thhmiss.CCCD"... (1 Reply)
Discussion started by: Jesshelle David
1 Replies

10. Shell Programming and Scripting

Bash - Find files excluding file patterns and subfolder patterns

Hello. For a given folder, I want to select any files find $PATH1 -f \( -name "*" but omit any files like pattern name ! -iname "*.jpg" ! -iname "*.xsession*" ..... \) and also omit any subfolder like pattern name -type d \( -name "/etc/gconf/gconf.*" -o -name "*cache*" -o -name "*Cache*" -o... (2 Replies)
Discussion started by: jcdole
2 Replies
SYSTEM_PROFILER(8)					    BSD System Manager's Manual 					SYSTEM_PROFILER(8)

NAME
system_profiler -- reports system hardware and software configuration. SYNOPSIS
system_profiler [-usage] system_profiler [-listDataTypes] system_profiler [-xml] dataType1 ... dataTypeN system_profiler [-xml] [-detailLevel level] DESCRIPTION
system_profiler reports on the hardware and software configuration of the system. It can generate plain text reports or XML reports which can be opened with System Information.app Progress and error messages are printed to stderr while actual report data is printed to stdout. Redirect stderr to /dev/null to suppress progress and error messages. The following options are available: -xml Generates a report in XML format. If the XML report is redirected to a file with a ".spx" suffix that file can be opened with System Information.app. -listDataTypes Lists the available datatypes. -detailLevel level Specifies the level of detail for the report: mini report with no personal information basic basic hardware and network information full all available information -timeout Specifies the maximum time to wait in seconds for results. If some information is not available within the specified time limit then an incomplete or partial report will be generated. The default timeout is 180 seconds. Specifying a time- out of 0 means no timeout. -usage Prints usage info and examples. EXAMPLES
system_profiler Generates a text report with the standard detail level. system_profiler -detailLevel mini Generates a short report containing no personal information. system_profiler -listDataTypes Shows a list of the available data types. system_profiler SPSoftwareDataType SPNetworkDataType Generates a text report containing only software and network data. system_profiler -xml > MyReport.spx Creates a XML file which can be opened by System Profiler.app AUTHORS
Apple Computer, Inc. Darwin June 30, 2003 Darwin
All times are GMT -4. The time now is 02:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy