Search Results

Search: Posts Made By: Deepthz
2,031
Posted By Deepthz
We are able to get the field from csv file using...
We are able to get the field from csv file using the command
cut -d , -f6 rpt.csv where f6 is the column with cent values.
But how do we convert that column into dollar?
2,031
Posted By Deepthz
Manipulating csv file
We need to convert a field in a csv file which is in cents to dollars.(divide by 100) in our shell script.
Can some body help me?
5,904
Posted By Deepthz
How to echo within EOF (here-document)
ssh $USR@$host /bin/bash <<\EOF >> ship-error.txt
awk 'BEGIN{f=0} !f { s=$0; sub(/,.+/, "", s); gsub(/[-: ]/, " ", s); t=(systime()-mktime(s)); if(t<=14400) f=1 } f ' /logs/shiperror.log
EOF

I...
9,043
Posted By Deepthz
But we have 3 awk commands like this: ssh...
But we have 3 awk commands like this:
ssh $USR@$host /bin/bash <<EOF
awk ' BEGIN{f=0} !f { s=$0; sub(/,.+/, "", s); gsub(/[-: ]/, " ", s); t=(systime()-mktime(s)); if(t<=14400) f=1 } f '...
9,043
Posted By Deepthz
Redirecting output to a local file after sshing
ssh $USR@$host /bin/bash <<EOF
awk ' BEGIN{f=0} !f { s=$0; sub(/,.+/, "", s); gsub(/[-: ]/, " ", s); t=(systime()-mktime(s)); if(t<=14400) f=1 } f ' /home/error.log >> error.txt
EOFWe are trying...
3,605
Posted By Deepthz
We are remoting to six different servers,so the...
We are remoting to six different servers,so the error file is getting created in these 6 servers.We need to append all these into a single file in our local machine so that we can mail it.So we are...
3,605
Posted By Deepthz
Thanks kevin.It worked with some modifications. ...
Thanks kevin.It worked with some modifications.
ssh user@IP /bin/bash <<\EOF
awk ' BEGIN{f=0} !f { s=$0; sub(/,.+/, "", s); gsub(/[-: ]/, " ", s); t=(systime()-mktime(s)); if(t<=14400) f=1 } f '...
3,605
Posted By Deepthz
syntax error near unexpected token `/,.+/,'
in the script while using the awk command with ssh like:
ssh user@IP awk 'BEGIN{f=0} !f { s=$0; sub(/,.+/,\"\", s); gsub(/[-: ]/,\" \", s);t=(systime()-mktime(s)); if(t<=14400) f=1 } f'...
3,605
Posted By Deepthz
I think it should check the date condition first....
I think it should check the date condition first. here is how i get the outfile as:

2010-11-20 14:59:39,960 ERROR
Shipment Error Log:Error Details - Account Id:3962, PO:2573485,...
3,605
Posted By Deepthz
Thanks for your quick response. We checked...
Thanks for your quick response.

We checked using your code.But still it copies all the logs in the file without checking the condition:(
3,605
Posted By Deepthz
Retrieve logs for last 4 hours
Our log file looks like this:
2010-11-18 00:57:01,698 ERROR
Shipment Error Log:Error Details - Account Id:3962, PO:2710015, Line:2, File:221112901, Version:V1, Desc:Order cannot...
Showing results 1 to 11 of 11

 
All times are GMT -4. The time now is 03:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy