Logic to separate the first name in the file


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Logic to separate the first name in the file
# 15  
Old 06-21-2017
It reads all the files created and pastes them into one file.
# 16  
Old 06-21-2017
But my requirement is to look for a file in the location and if not has to create it first, if it is available I have to append these values in the end of the file. in different format, not directly.
like
ex
after the 1st function, I will be getting output as abc.list, xyz.list, cd-ef.list, gfd.list in a directoy named info.

apart from this output I need another file, let it be the same name you mentioned as outputfile. In this output file.
If I open the file it should have.
Code:
NAME= abc
TYPE=doc
NAME=xyz
TYPE=doc
NAME=cd-ef
TYPE=doc
NAME=gfd
TYPE=doc

here TPYE can be hardcoded.

Sorry to trouble, As, I am a newbee, I am struggling a lot.
Login or Register to Ask a Question

Previous Thread | Next Thread

1 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script (sh file) logic to compare contents of one file with another file and output to file

Shell script logic Hi I have 2 input files like with file 1 content as (file1) "BRGTEST-242" a.txt "BRGTEST-240" a.txt "BRGTEST-219" e.txt File 2 contents as fle(2) "BRGTEST-244" a.txt "BRGTEST-244" b.txt "BRGTEST-231" c.txt "BRGTEST-231" d.txt "BRGTEST-221" e.txt I want to get... (22 Replies)
Discussion started by: pottic
22 Replies
Login or Register to Ask a Question