Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


There are two file are there .1st file contains 5 records and
2nd file contain 10 records in target they want 50 records.how
can achieve this



There are two file are there .1st file contains 5 records and 2nd file contain 10 records in targe..

Answer / Rishabh Kumar Kashyap

To combine the contents of two files with a total of 50 records, you can use a script or command depending on the operating system and specific tools available. Here is an example using Unix-based systems like Linux:
1. First, concatenate the two files using the `cat` command:
```bash
cat file1.txt file2.txt > combined.txt
```
2. Next, append the required number of empty lines to the combined file using the `sed` command:
```bash
sed -i '$an' combined.txt
```
3. Repeat step 2 until you have the desired number of empty lines (in this case, 40 times).
4. Now, generate 5 more records using a tool like `echo` and append them to the end of the file:
```bash
for i in {1..5}; do echo "Record $i" >> combined.txt; done
```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Stage Interview Questions

is it possible to access the same job by two users at a time in DataStage?

2 Answers   IBM,


What all the types of jobs you developed?

1 Answers  


INPUT file 'A' contains: 1 2 3 4 5 6 7 8 9 10 input file 'B' contains: 6 7 8 9 10 11 12 13 14 15 Output file 'X' contains: 1 2 3 4 5 Output file 'Y' contains: 6 7 8 9 10 Output file 'Z' contains: 11 12 13 14 15 How can we implement this in a single ds job?

11 Answers   CTS,


How a server job can be converted to a parallel job?

1 Answers  


How the ipc stage work?

1 Answers  


What is the difference between SQl Loader and OCI in datastage?

2 Answers   CSC,


how to achieve this output ? Two Input columns(ID & Name) - ID | Name 1 | Jack 1 | Kara In output there should be only 1 column which will be populated as - 1,Jack 1,Kara

1 Answers  


What is the use of datastage designer?

1 Answers  


what are fact tables and dimension tables? give example assuming one table.

3 Answers   IBM,


Hi, I am getting data from sequential file like below column1 A&B C&D A&E X&Y&Z v&x But I need the target column as like below column1 A and B C and D A and E X and Y and Z v and x

7 Answers  


Where do you see different stages in the designer?

1 Answers  


Terminate Activity

1 Answers   CTS,


Categories