Jump to content

calling unix / shell scripting experts


mettastar

Recommended Posts

Hello experts

nenu oka script raasa and while executing that script I want each step execution withi in the script to be written into a log file. Tell me how to achieve this

 

I tried this

bash -x script.sh param >logfile.log 2>&1 

But this is giving me lot of info which i don't need..

Link to comment
Share on other sites

7 minutes ago, mettastar said:

Hello experts

nenu oka script raasa and while executing that script I want each step execution withi in the script to be written into a log file. Tell me how to achieve this

 

I tried this

bash -x script.sh param >logfile.log 2>&1 

But this is giving me lot of info which i don't need..

ayethey grep kottu

Link to comment
Share on other sites

9 minutes ago, mettastar said:

Hello experts

nenu oka script raasa and while executing that script I want each step execution withi in the script to be written into a log file. Tell me how to achieve this

 

I tried this

bash -x script.sh param >logfile.log 2>&1 

But this is giving me lot of info which i don't need..

separate ga monitoring/logging with color coding for type of messages ki oka wrapper rayi.. 

Link to comment
Share on other sites

14 minutes ago, dkchinnari said:

bash -x script.sh param >logfile.log 2>&1&1>3

chesaa na mottaa.. script end avatledu.. ey command adi what is '3' there? 

1- stdout

2- stderr

3- ?

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  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...