Jump to content
The mkiv Supra Owners Club

A little Unix scripting help.


MrRalphMan

Recommended Posts

All,

 

I am currently re-writing a perl script that extracts some Netbackup Data to load into a DB.

 

I now want to add the host name to the output file, but not sure the best way to do it.

 

Below is the current row and the variable that I added, the bold text, but awk doesn't know about it, so never prints it.

 

What's the best way to do this?

 

[font="Courier New"]system( "/usr/openv/netbackup/bin/admincmd/bpdbjobs -report -gdm | awk -F\",\" \'{OFS=\",\" ; print [b]\$host_name,[/b]\$16,\$2,\$3,\$4
,\$9,\$5}\' > $job_full_output_location" ) ;[/font]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. You might also be interested in our Guidelines, Privacy Policy and Terms of Use.