Posts

Showing posts from August, 2018

How to combine alternate lines in a file?

Image
Clash Royale CLAN TAG #URR8PPP up vote 1 down vote favorite 2 I have a 4 line input file and i need to modify the file to combine alternate lines. I want to perform the operation in place. INPUT: Tom Nathan Jack Polo Desired Output: Tom Jack Nathan Polo One way is to collect odd numbered lines and flip them and cut even numbered lines and combine both files to get the final output. But i am looking for a simpler solution. text-processing awk sed paste share | improve this question asked Jan 12 at 19:55 ayrton_senna 492 2 4 16 add a comment  |  up vote 1 down vote favorite 2 I have a 4 line input file and i need to modify the file to combine alternate lines. I want to perform the operation in place. INPUT: Tom Nathan Jack Polo Desired Output: Tom Jack Nathan Polo One way is to collect odd numbered lines and flip them and cut even numbered lines and combine both files to get the final output. But i am looking for a simpler solu

mtx reverses the numbers given to tape drives by CentOS and scsi generic (sg) devices

Image
Clash Royale CLAN TAG #URR8PPP up vote 0 down vote favorite we have some confusion when we run mtx commands to load a tape from an autoloader slot to tape drive. we have two LTO-5 tape drives connected to our backup server. They are recognized by the operating system as /dev/st0 and /dev/st1. We're also using a Quantum Scalar-i40 as our tape auto library which points to /dev/sg2 via a symlink /dev/changer. When I load a tape from slot 36 to tape drive 1 via mtx, the mtx status seem fine. # load tape in slot 36 to tape drive 1 [root@backup ~]# mtx -f /dev/changer load 36 1 Loading media from Storage Element 36 into drive 1...done [root@backup ~]# mtx -f /dev/changer status Storage Changer /dev/changer:2 Drives, 38 Slots ( 0 Import/Export ) Data Transfer Element 0:Empty Data Transfer Element 1:Full (Storage Element 36 Loaded):VolumeTag = JP6650 Storage Element 1:Full :VolumeTag=JP6657 *** Storage Element 36:Empty:VolumeTag= Storage Element 37:Full :VolumeTag=JP6653