LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-04-2017, 01:02 PM   #1
TimeToAsk
LQ Newbie
 
Registered: Jul 2017
Posts: 1

Rep: Reputation: Disabled
Question Linux code related query


I have to write a code where I have the below files in a directory
To every corresponding A1(an output file format say pdf),there should be a file P1(Customer information File).Now,I need to process these files for a scenario where the below is present

A1,A2,A3

P1,P3,P4

Here P2 and A4 are missing.

All of the above are in the same directory and need to processed(as in moved to another processing directory and your code should then use the files to create a final file using the above information)

I want the code to check and pick only file combinations and leave rest unwanted files.Say: A1,P1 and A3,P3 should be picked and processed and rest all should be thrown as an error.

How can I achieve that
 
Old 07-04-2017, 01:16 PM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by TimeToAsk View Post
I have to write a code where I have the below files in a directory
To every corresponding A1(an output file format say pdf),there should be a file P1(Customer information File).Now,I need to process these files for a scenario where the below is present

A1,A2,A3

P1,P3,P4

Here P2 and A4 are missing.

All of the above are in the same directory and need to processed(as in moved to another processing directory and your code should then use the files to create a final file using the above information) I want the code to check and pick only file combinations and leave rest unwanted files.Say: A1,P1 and A3,P3 should be picked and processed and rest all should be thrown as an error.

How can I achieve that
Lots of ways; however, you first need to read the "Question Guidelines" link in my posting signature. You need to provide details (such as version/distro of Linux), as well as what language you want to write this in. The tools/options available vary by language, and what's good for bash may not be best for perl, python, or other languages.

And we are happy to help you, but you are going to have to post what *you* have written/done/tried on your own first. We will not write your scripts/programs for you.
 
Old 07-04-2017, 04:10 PM   #3
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by TimeToAsk View Post
I have to write a code where I have the below files in a directory
To every corresponding A1(an output file format say pdf),there should be a file P1(Customer information File).Now,I need to process these files for a scenario where the below is present

A1,A2,A3

P1,P3,P4

Here P2 and A4 are missing.

All of the above are in the same directory and need to processed(as in moved to another processing directory and your code should then use the files to create a final file using the above information)

I want the code to check and pick only file combinations and leave rest unwanted files.Say: A1,P1 and A3,P3 should be picked and processed and rest all should be thrown as an error.

How can I achieve that
Hi TimeToAsk and welcome to LQ.

This appears an awful lot like an assignment or homework question.

As TB0ne points out, we are happy to help, but we will not write your programs for you. What language are you planning to use for this project?
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
FSCK related query tuxianD Solaris / OpenSolaris 1 02-28-2011 05:23 AM
Query related to Linux thin clients saagar Linux - Newbie 2 02-25-2010 04:03 PM
One query related libstdc++.so.5 utkarshrawat Linux - Newbie 2 05-27-2008 02:01 AM
kernel related query abhidude Linux - General 2 11-29-2004 09:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration