Let's assume that I already have a file created. This file creation comes from the execution of a command. The contents of the file will be up to 4 different lines looking something like this:
LUN Path: servernam:/vol/server_xx_t1_01_223_04/mssql01/server_StorageSystemLevel100.lun LUN Path: servernam:/vol/server_xx_t1_01_225_04/mssql01/server_StorageSystemLevel100.lun LUN Path: servernam:/vol/server_xx_t1_01_226_04/mssql01/server_StorageSystemLevel100.lun LUN Path: servernam:/vol/server_xx_t1_01_228_04/mssql01/server_StorageSystemLevel100.lun
How can I pipe/awk/whatever this file so I can get the second string, i.e. "servernam:/vol/serverxxxx", and then run a command like:
So I want to pull the right string out of the file and include it as an argument to a command. Note that I would need to do the same execution command against all 4 different strings. A script example, or even better all from the command line, would be much appreciated.