Form an unstructured record into structured record in UNIX script Announcing the arrival of...

Why not use the yoke to control yaw, as well as pitch and roll?

"Destructive power" carried by a B-52?

How do Java 8 default methods hеlp with lambdas?

How does the body cool itself in a stillsuit?

My mentor says to set image to Fine instead of RAW — how is this different from JPG?

The test team as an enemy of development? And how can this be avoided?

How many time has Arya actually used Needle?

Does a random sequence of vectors span a Hilbert space?

By what mechanism was the 2017 UK General Election called?

Did pre-Columbian Americans know the spherical shape of the Earth?

How to resize main filesystem

How does TikZ render an arc?

Vertical ranges of Column Plots in 12

Improvising over quartal voicings

Found this skink in my tomato plant bucket. Is he trapped? Or could he leave if he wanted?

How could a hydrazine and N2O4 cloud (or it's reactants) show up in weather radar?

Is there night in Alpha Complex?

French equivalents of おしゃれは足元から (Every good outfit starts with the shoes)

Determine whether an integer is a palindrome

Inverse square law not accurate for non-point masses?

Why does BitLocker not use RSA?

Why did Bronn offer to be Tyrion Lannister's champion in trial by combat?

Why are two-digit numbers in Jonathan Swift's "Gulliver's Travels" (1726) written in "German style"?

Marquee sign letters



Form an unstructured record into structured record in UNIX script



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
2019 Community Moderator Election Results
Why I closed the “Why is Kali so hard” questionconvert scientific data into genericForm a output by combining multiple linesSeparate values based on recordhow to change record or field separator of a fileHow to fold 'grep -c <token> *.h *.cpp' into a single count?Break a string of host names into columnsWrite xommand in Solaris, UnixChange numbers in this form: 0.873000 / 0,234000 into this form: 87 / 23Copy and Paste Header record into detailDisplay Student Record in Unix





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







-1















Using UNIX script the following code to be developed.



I have a file 20-40 GB data contains data like below. Providing sample records.



AUTO="text1" CAR="its mine" LORRY="commercial vehicle" CART="simple " BULLCART="same old one simple with bull" TRUCK="Multi purpose"
AUTO="text2" BUS="commercial vehicle" LORRY="its a vehicle" CART="without bull" BULLCART="with bull" TRUCK="Multi purpose"
AUTO="text3" BUS="commercial vehicle" CAR="Personal" LORRY="mini one ?" BULLCART="bull" TRUCK="Multi purpose"
AUTO="" CART="simple without bull" BULLCART="nothing spl with bull" TRUCK="Multi purpose"
AUTO="long text" BUS="commercial vehicle" CAR="jubel" BULLCART="" TRUCK="Multi purpose"
AUTO="message" CAR="others" LORRY="commercial vehicle" BULLCART="not null" TRUCK="Multi purpose"
AUTO="cleverwiz" BUS="commercial vehicle" CAR="yours" LORRY="max vehicle" CART="bull is there" TRUCK="Multi purpose"
AUTO="passengers only" BUS="commercial vehicle" CAR="ramsoh" LORRY="maintainable " CART="old one" BULLCART="simple with bull"


the order of fields are AUTO, BUS, CAR, LORRY, CART, BULLCART, TRUCK



Expected output should be, if in case CAR is not present, then need to insert 3rd field CAR=""; if no LORRY, then insert LORRY="" as 4th field.



If you look at the 1st record BUS is not there, need to insert BUS="" as second field. so the output will be



AUTO="text1" BUS="" CAR="its mine" LORRY="commercial vehicle" CART="simple " BULLCART="same old one simple with bull" TRUCK="Multi purpose"


4th record BUS, CAR, LORRY are not there, so, need to insert BUS="" CAR="". The output will be



AUTO="" BUS="" CAR="" LORRY="" CART="simple without bull" BULLCART="nothing spl with bull" TRUCK="Multi purpose"









share|improve this question









New contributor




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





















  • You can edit your own question if you have additional details, no need to comment. Also, is the output shown the full result based on the sample records? If not please indicate the full result you expect to get based on the input shown. And if you have some working code fragments please add them as well.

    – nohillside
    2 days ago











  • Since you seemingly want each line to be the same, why would it not be possible to just print the same line until you have the appropriate number of lines?

    – Kusalananda
    2 days ago


















-1















Using UNIX script the following code to be developed.



I have a file 20-40 GB data contains data like below. Providing sample records.



AUTO="text1" CAR="its mine" LORRY="commercial vehicle" CART="simple " BULLCART="same old one simple with bull" TRUCK="Multi purpose"
AUTO="text2" BUS="commercial vehicle" LORRY="its a vehicle" CART="without bull" BULLCART="with bull" TRUCK="Multi purpose"
AUTO="text3" BUS="commercial vehicle" CAR="Personal" LORRY="mini one ?" BULLCART="bull" TRUCK="Multi purpose"
AUTO="" CART="simple without bull" BULLCART="nothing spl with bull" TRUCK="Multi purpose"
AUTO="long text" BUS="commercial vehicle" CAR="jubel" BULLCART="" TRUCK="Multi purpose"
AUTO="message" CAR="others" LORRY="commercial vehicle" BULLCART="not null" TRUCK="Multi purpose"
AUTO="cleverwiz" BUS="commercial vehicle" CAR="yours" LORRY="max vehicle" CART="bull is there" TRUCK="Multi purpose"
AUTO="passengers only" BUS="commercial vehicle" CAR="ramsoh" LORRY="maintainable " CART="old one" BULLCART="simple with bull"


the order of fields are AUTO, BUS, CAR, LORRY, CART, BULLCART, TRUCK



Expected output should be, if in case CAR is not present, then need to insert 3rd field CAR=""; if no LORRY, then insert LORRY="" as 4th field.



If you look at the 1st record BUS is not there, need to insert BUS="" as second field. so the output will be



AUTO="text1" BUS="" CAR="its mine" LORRY="commercial vehicle" CART="simple " BULLCART="same old one simple with bull" TRUCK="Multi purpose"


4th record BUS, CAR, LORRY are not there, so, need to insert BUS="" CAR="". The output will be



AUTO="" BUS="" CAR="" LORRY="" CART="simple without bull" BULLCART="nothing spl with bull" TRUCK="Multi purpose"









share|improve this question









New contributor




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





















  • You can edit your own question if you have additional details, no need to comment. Also, is the output shown the full result based on the sample records? If not please indicate the full result you expect to get based on the input shown. And if you have some working code fragments please add them as well.

    – nohillside
    2 days ago











  • Since you seemingly want each line to be the same, why would it not be possible to just print the same line until you have the appropriate number of lines?

    – Kusalananda
    2 days ago














-1












-1








-1








Using UNIX script the following code to be developed.



I have a file 20-40 GB data contains data like below. Providing sample records.



AUTO="text1" CAR="its mine" LORRY="commercial vehicle" CART="simple " BULLCART="same old one simple with bull" TRUCK="Multi purpose"
AUTO="text2" BUS="commercial vehicle" LORRY="its a vehicle" CART="without bull" BULLCART="with bull" TRUCK="Multi purpose"
AUTO="text3" BUS="commercial vehicle" CAR="Personal" LORRY="mini one ?" BULLCART="bull" TRUCK="Multi purpose"
AUTO="" CART="simple without bull" BULLCART="nothing spl with bull" TRUCK="Multi purpose"
AUTO="long text" BUS="commercial vehicle" CAR="jubel" BULLCART="" TRUCK="Multi purpose"
AUTO="message" CAR="others" LORRY="commercial vehicle" BULLCART="not null" TRUCK="Multi purpose"
AUTO="cleverwiz" BUS="commercial vehicle" CAR="yours" LORRY="max vehicle" CART="bull is there" TRUCK="Multi purpose"
AUTO="passengers only" BUS="commercial vehicle" CAR="ramsoh" LORRY="maintainable " CART="old one" BULLCART="simple with bull"


the order of fields are AUTO, BUS, CAR, LORRY, CART, BULLCART, TRUCK



Expected output should be, if in case CAR is not present, then need to insert 3rd field CAR=""; if no LORRY, then insert LORRY="" as 4th field.



If you look at the 1st record BUS is not there, need to insert BUS="" as second field. so the output will be



AUTO="text1" BUS="" CAR="its mine" LORRY="commercial vehicle" CART="simple " BULLCART="same old one simple with bull" TRUCK="Multi purpose"


4th record BUS, CAR, LORRY are not there, so, need to insert BUS="" CAR="". The output will be



AUTO="" BUS="" CAR="" LORRY="" CART="simple without bull" BULLCART="nothing spl with bull" TRUCK="Multi purpose"









share|improve this question









New contributor




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












Using UNIX script the following code to be developed.



I have a file 20-40 GB data contains data like below. Providing sample records.



AUTO="text1" CAR="its mine" LORRY="commercial vehicle" CART="simple " BULLCART="same old one simple with bull" TRUCK="Multi purpose"
AUTO="text2" BUS="commercial vehicle" LORRY="its a vehicle" CART="without bull" BULLCART="with bull" TRUCK="Multi purpose"
AUTO="text3" BUS="commercial vehicle" CAR="Personal" LORRY="mini one ?" BULLCART="bull" TRUCK="Multi purpose"
AUTO="" CART="simple without bull" BULLCART="nothing spl with bull" TRUCK="Multi purpose"
AUTO="long text" BUS="commercial vehicle" CAR="jubel" BULLCART="" TRUCK="Multi purpose"
AUTO="message" CAR="others" LORRY="commercial vehicle" BULLCART="not null" TRUCK="Multi purpose"
AUTO="cleverwiz" BUS="commercial vehicle" CAR="yours" LORRY="max vehicle" CART="bull is there" TRUCK="Multi purpose"
AUTO="passengers only" BUS="commercial vehicle" CAR="ramsoh" LORRY="maintainable " CART="old one" BULLCART="simple with bull"


the order of fields are AUTO, BUS, CAR, LORRY, CART, BULLCART, TRUCK



Expected output should be, if in case CAR is not present, then need to insert 3rd field CAR=""; if no LORRY, then insert LORRY="" as 4th field.



If you look at the 1st record BUS is not there, need to insert BUS="" as second field. so the output will be



AUTO="text1" BUS="" CAR="its mine" LORRY="commercial vehicle" CART="simple " BULLCART="same old one simple with bull" TRUCK="Multi purpose"


4th record BUS, CAR, LORRY are not there, so, need to insert BUS="" CAR="". The output will be



AUTO="" BUS="" CAR="" LORRY="" CART="simple without bull" BULLCART="nothing spl with bull" TRUCK="Multi purpose"






text-processing text-formatting wordpress write word-processing






share|improve this question









New contributor




BNRINBOX 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




BNRINBOX 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








edited 57 mins ago







BNRINBOX













New contributor




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









asked Apr 17 at 13:04









BNRINBOXBNRINBOX

83




83




New contributor




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





New contributor





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






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













  • You can edit your own question if you have additional details, no need to comment. Also, is the output shown the full result based on the sample records? If not please indicate the full result you expect to get based on the input shown. And if you have some working code fragments please add them as well.

    – nohillside
    2 days ago











  • Since you seemingly want each line to be the same, why would it not be possible to just print the same line until you have the appropriate number of lines?

    – Kusalananda
    2 days ago



















  • You can edit your own question if you have additional details, no need to comment. Also, is the output shown the full result based on the sample records? If not please indicate the full result you expect to get based on the input shown. And if you have some working code fragments please add them as well.

    – nohillside
    2 days ago











  • Since you seemingly want each line to be the same, why would it not be possible to just print the same line until you have the appropriate number of lines?

    – Kusalananda
    2 days ago

















You can edit your own question if you have additional details, no need to comment. Also, is the output shown the full result based on the sample records? If not please indicate the full result you expect to get based on the input shown. And if you have some working code fragments please add them as well.

– nohillside
2 days ago





You can edit your own question if you have additional details, no need to comment. Also, is the output shown the full result based on the sample records? If not please indicate the full result you expect to get based on the input shown. And if you have some working code fragments please add them as well.

– nohillside
2 days ago













Since you seemingly want each line to be the same, why would it not be possible to just print the same line until you have the appropriate number of lines?

– Kusalananda
2 days ago





Since you seemingly want each line to be the same, why would it not be possible to just print the same line until you have the appropriate number of lines?

– Kusalananda
2 days ago










0






active

oldest

votes












Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






BNRINBOX is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f512998%2fform-an-unstructured-record-into-structured-record-in-unix-script%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes








BNRINBOX is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















BNRINBOX is a new contributor. Be nice, and check out our Code of Conduct.













BNRINBOX is a new contributor. Be nice, and check out our Code of Conduct.












BNRINBOX is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f512998%2fform-an-unstructured-record-into-structured-record-in-unix-script%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...