From a txt file doing data manipulationTo write a Shell script [on hold]











up vote
-4
down vote

favorite












I have a file like below (from below 1st image) .(so many records are there , this is a snap shot)
I need to write a shell script to find the o/p in two files from the single files .
My o/p files should be like this as given below.
1st o/p file(2nd image) and the 2nd o/p file(3rd image)enter image description here .
From the I/p file all the headers lines are in the 1st o/p files with a unique key like A, B C... are prefixed with a space in between .
In the 2nd O/P files all the A headers data are there with prefixed with A (A header unique key) with a space in between .like then B header data ,C header data so on .



enter image description here



enter image description here










share|improve this question







New contributor




Prakash Rout is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as too broad by Rui F Ribeiro, Thomas, dr01, Jeff Schaller, Archemar 2 days ago


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.















  • Please show us what you have done until now, and where exactly you need some clarifications.
    – Rui F Ribeiro
    2 days ago












  • I extracted all headers and all the data from the input file separately . But I didn't put the unique key like A,B,C to the headers(prefixed) and the corresponding header unique key to the respective records of the header .
    – Prakash Rout
    2 days ago






  • 2




    Please, don't post images of text. To be able to develop and test solutions, we would have to manually type in your data. This stops people from wanting to be helpful.
    – Kusalananda
    2 days ago








  • 1




    Please edit your question and i) replace the images with actual text (use the formatting tools) so we can test our answers; ii) explain what you need more clearly. What's "o/p"? What's "I/p"? Is it input and output? What What do you actually want to do? What have you tried so far? The more details you give us, the likelier it is we will be able to answer.
    – terdon
    2 days ago










  • Possible duplicate of data manipulation of text file through shell script
    – Jeff Schaller
    2 days ago















up vote
-4
down vote

favorite












I have a file like below (from below 1st image) .(so many records are there , this is a snap shot)
I need to write a shell script to find the o/p in two files from the single files .
My o/p files should be like this as given below.
1st o/p file(2nd image) and the 2nd o/p file(3rd image)enter image description here .
From the I/p file all the headers lines are in the 1st o/p files with a unique key like A, B C... are prefixed with a space in between .
In the 2nd O/P files all the A headers data are there with prefixed with A (A header unique key) with a space in between .like then B header data ,C header data so on .



enter image description here



enter image description here










share|improve this question







New contributor




Prakash Rout is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











put on hold as too broad by Rui F Ribeiro, Thomas, dr01, Jeff Schaller, Archemar 2 days ago


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.















  • Please show us what you have done until now, and where exactly you need some clarifications.
    – Rui F Ribeiro
    2 days ago












  • I extracted all headers and all the data from the input file separately . But I didn't put the unique key like A,B,C to the headers(prefixed) and the corresponding header unique key to the respective records of the header .
    – Prakash Rout
    2 days ago






  • 2




    Please, don't post images of text. To be able to develop and test solutions, we would have to manually type in your data. This stops people from wanting to be helpful.
    – Kusalananda
    2 days ago








  • 1




    Please edit your question and i) replace the images with actual text (use the formatting tools) so we can test our answers; ii) explain what you need more clearly. What's "o/p"? What's "I/p"? Is it input and output? What What do you actually want to do? What have you tried so far? The more details you give us, the likelier it is we will be able to answer.
    – terdon
    2 days ago










  • Possible duplicate of data manipulation of text file through shell script
    – Jeff Schaller
    2 days ago













up vote
-4
down vote

favorite









up vote
-4
down vote

favorite











I have a file like below (from below 1st image) .(so many records are there , this is a snap shot)
I need to write a shell script to find the o/p in two files from the single files .
My o/p files should be like this as given below.
1st o/p file(2nd image) and the 2nd o/p file(3rd image)enter image description here .
From the I/p file all the headers lines are in the 1st o/p files with a unique key like A, B C... are prefixed with a space in between .
In the 2nd O/P files all the A headers data are there with prefixed with A (A header unique key) with a space in between .like then B header data ,C header data so on .



enter image description here



enter image description here










share|improve this question







New contributor




Prakash Rout is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I have a file like below (from below 1st image) .(so many records are there , this is a snap shot)
I need to write a shell script to find the o/p in two files from the single files .
My o/p files should be like this as given below.
1st o/p file(2nd image) and the 2nd o/p file(3rd image)enter image description here .
From the I/p file all the headers lines are in the 1st o/p files with a unique key like A, B C... are prefixed with a space in between .
In the 2nd O/P files all the A headers data are there with prefixed with A (A header unique key) with a space in between .like then B header data ,C header data so on .



enter image description here



enter image description here







scripting






share|improve this question







New contributor




Prakash Rout is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




Prakash Rout is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




Prakash Rout is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 2 days ago









Prakash Rout

12




12




New contributor




Prakash Rout is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Prakash Rout is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Prakash Rout is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




put on hold as too broad by Rui F Ribeiro, Thomas, dr01, Jeff Schaller, Archemar 2 days ago


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.






put on hold as too broad by Rui F Ribeiro, Thomas, dr01, Jeff Schaller, Archemar 2 days ago


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • Please show us what you have done until now, and where exactly you need some clarifications.
    – Rui F Ribeiro
    2 days ago












  • I extracted all headers and all the data from the input file separately . But I didn't put the unique key like A,B,C to the headers(prefixed) and the corresponding header unique key to the respective records of the header .
    – Prakash Rout
    2 days ago






  • 2




    Please, don't post images of text. To be able to develop and test solutions, we would have to manually type in your data. This stops people from wanting to be helpful.
    – Kusalananda
    2 days ago








  • 1




    Please edit your question and i) replace the images with actual text (use the formatting tools) so we can test our answers; ii) explain what you need more clearly. What's "o/p"? What's "I/p"? Is it input and output? What What do you actually want to do? What have you tried so far? The more details you give us, the likelier it is we will be able to answer.
    – terdon
    2 days ago










  • Possible duplicate of data manipulation of text file through shell script
    – Jeff Schaller
    2 days ago


















  • Please show us what you have done until now, and where exactly you need some clarifications.
    – Rui F Ribeiro
    2 days ago












  • I extracted all headers and all the data from the input file separately . But I didn't put the unique key like A,B,C to the headers(prefixed) and the corresponding header unique key to the respective records of the header .
    – Prakash Rout
    2 days ago






  • 2




    Please, don't post images of text. To be able to develop and test solutions, we would have to manually type in your data. This stops people from wanting to be helpful.
    – Kusalananda
    2 days ago








  • 1




    Please edit your question and i) replace the images with actual text (use the formatting tools) so we can test our answers; ii) explain what you need more clearly. What's "o/p"? What's "I/p"? Is it input and output? What What do you actually want to do? What have you tried so far? The more details you give us, the likelier it is we will be able to answer.
    – terdon
    2 days ago










  • Possible duplicate of data manipulation of text file through shell script
    – Jeff Schaller
    2 days ago
















Please show us what you have done until now, and where exactly you need some clarifications.
– Rui F Ribeiro
2 days ago






Please show us what you have done until now, and where exactly you need some clarifications.
– Rui F Ribeiro
2 days ago














I extracted all headers and all the data from the input file separately . But I didn't put the unique key like A,B,C to the headers(prefixed) and the corresponding header unique key to the respective records of the header .
– Prakash Rout
2 days ago




I extracted all headers and all the data from the input file separately . But I didn't put the unique key like A,B,C to the headers(prefixed) and the corresponding header unique key to the respective records of the header .
– Prakash Rout
2 days ago




2




2




Please, don't post images of text. To be able to develop and test solutions, we would have to manually type in your data. This stops people from wanting to be helpful.
– Kusalananda
2 days ago






Please, don't post images of text. To be able to develop and test solutions, we would have to manually type in your data. This stops people from wanting to be helpful.
– Kusalananda
2 days ago






1




1




Please edit your question and i) replace the images with actual text (use the formatting tools) so we can test our answers; ii) explain what you need more clearly. What's "o/p"? What's "I/p"? Is it input and output? What What do you actually want to do? What have you tried so far? The more details you give us, the likelier it is we will be able to answer.
– terdon
2 days ago




Please edit your question and i) replace the images with actual text (use the formatting tools) so we can test our answers; ii) explain what you need more clearly. What's "o/p"? What's "I/p"? Is it input and output? What What do you actually want to do? What have you tried so far? The more details you give us, the likelier it is we will be able to answer.
– terdon
2 days ago












Possible duplicate of data manipulation of text file through shell script
– Jeff Schaller
2 days ago




Possible duplicate of data manipulation of text file through shell script
– Jeff Schaller
2 days ago















active

oldest

votes






















active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

Accessing regular linux commands in Huawei's Dopra Linux

Can't connect RFCOMM socket: Host is down

Kernel panic - not syncing: Fatal Exception in Interrupt