{"id":1392,"date":"2008-03-18T12:00:00","date_gmt":"2008-03-18T12:00:00","guid":{"rendered":"http:\/\/orcldoug.com\/blog\/?p=1392"},"modified":"2008-03-18T12:00:00","modified_gmt":"2008-03-18T12:00:00","slug":"paste","status":"publish","type":"post","link":"http:\/\/orcldoug.com\/blog\/2008\/03\/18\/paste\/","title":{"rendered":"Paste"},"content":{"rendered":"<p>[As part of the occasional series on small but useful Unix commands &#8230;]<\/p>\n<p>I&#8217;ve always loved Unix and vi and despair at those who prefer to faff around on Windows trying to edit files with an operating system and editors that, yes, are much more friendly but are hopelessly limited. The advent of Google (and yes, I&#8217;m more than aware of previous search engines) has added to the Unix\/vi combination when I desperately need to solve a text processing problem in a hurry. I&#8217;m no awk expert!<\/p>\n<p>Last Friday was one of those desperate moments. I was in the midst of an environment refresh and was rolling the test database forward using the Production control file. Each time I got a new copy of the control file to roll forward a bit more (because we use the control file as the RMAN repository), I wanted to rename the 170+ datafiles that make up the database. I had an ordered list of test and production files and their respective paths, but in two seperate files. All I wanted was to mingle the lines from each file into one file, with the two filenames on a single line.<\/p>\n<p>I won&#8217;t go into the details and I definitely won&#8217;t get into extended dialogues about alternative solutions and why they didn&#8217;t apply here*. This is a simple blog about <a href=\"http:\/\/www.softpanorama.org\/Tools\/paste.shtml\">the Unix paste command<\/a>, which came to my rescue. (That link is to the very first Google result &#8211; no research or careful review.)<\/p>\n<p>* No doubt those conversations will crop up, but I&#8217;m in course slide hell at the moment so don&#8217;t expect much response from me.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>[As part of the occasional series on small but useful Unix commands &#8230;] I&#8217;ve always loved Unix and vi and despair at those who prefer to faff around on Windows trying to edit files with an operating system and editors that, yes, are much more friendly but are hopelessly limited. The advent of Google (and&hellip; <a class=\"more-link\" href=\"http:\/\/orcldoug.com\/blog\/2008\/03\/18\/paste\/\">Continue reading <span class=\"screen-reader-text\">Paste<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1392","post","type-post","status-publish","format-standard","hentry","category-uncategorized","entry"],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":1288,"url":"http:\/\/orcldoug.com\/blog\/2007\/06\/22\/sigh\/","url_meta":{"origin":1392,"position":0},"title":"Sigh","date":"June 22, 2007","format":false,"excerpt":"Whilst I might admire Alex G's new BAAG party, I have less lofty ideals. My personal battle is against people who keep offering the following sage advice to the crucial question - How do I backup my database? As UNIX user oracle run: TODAY=`date \"+%Y-%m-%d\"` FILE=$TODAY-$ORACLE_SID.dat exp system\/manager file=$FILE consistent=y\u2026","rel":"","context":"With 33 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1066,"url":"http:\/\/orcldoug.com\/blog\/2006\/08\/29\/great-expectations\/","url_meta":{"origin":1392,"position":1},"title":"Great Expectations","date":"August 29, 2006","format":false,"excerpt":"I'm working on our script to change the oracle owner unix account password across our server estate at the moment and it occurred to me it might be worth mentioning the expect utility for anyone who might not have come across it. It allows you to write scripts that automate\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":873,"url":"http:\/\/orcldoug.com\/blog\/2006\/01\/25\/bits-and-pieces\/","url_meta":{"origin":1392,"position":2},"title":"Bits and Pieces","date":"January 25, 2006","format":false,"excerpt":"Having finally finished work for the day, I have some bits and pieces before I get back to the Hotsos tests.Mike ScottI mentioned that Mike Scott has been been really helpful with preparing test environments and offering intelligent argument. Mike's a Unix System Administrator and has some really interesting articles\u2026","rel":"","context":"Similar post","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1332,"url":"http:\/\/orcldoug.com\/blog\/2007\/10\/28\/script\/","url_meta":{"origin":1392,"position":3},"title":"Script","date":"October 28, 2007","format":false,"excerpt":"Well, as the which blog was deemed useful (although most commentors did already know about it), how about the script Unix command?It's very useful for keeping a record of an extended series of actions, like those a DBA will often encounter when implementing a complex change. It's also useful for\u2026","rel":"","context":"With 5 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1107,"url":"http:\/\/orcldoug.com\/blog\/2006\/10\/22\/dtrace\/","url_meta":{"origin":1392,"position":4},"title":"DTrace","date":"October 22, 2006","format":false,"excerpt":"I've certainly hinted at it before, but if there's one good reason for Oracle techies to run Solaris 10 (or OpenSolaris) on their home equipment, it's this. As far as I'm aware, there is nothing available on Linux which is within a million miles of DTrace in helping you see\u2026","rel":"","context":"With 6 comments","img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1080,"url":"http:\/\/orcldoug.com\/blog\/2006\/09\/06\/rip-bear\/","url_meta":{"origin":1392,"position":5},"title":"RIP Bear","date":"September 6, 2006","format":false,"excerpt":"In spite of the tone of some of the comments on my previous blog, the tragic bear incident was absolutely nothing to do with me. I made it clear that he was hanging from the ceiling when I turned up to work.Fortunately, Paolo in the office suggested that we get\u2026","rel":"","context":"With 5 comments","img":{"alt_text":"","src":"https:\/\/i0.wp.com\/oracledoug.com\/serendipity\/uploads\/bearfuneral.JPG?resize=350%2C200","width":350,"height":200},"classes":[]}],"_links":{"self":[{"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/posts\/1392","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/comments?post=1392"}],"version-history":[{"count":0,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/posts\/1392\/revisions"}],"wp:attachment":[{"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/media?parent=1392"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/categories?post=1392"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/orcldoug.com\/blog\/wp-json\/wp\/v2\/tags?post=1392"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}