Search Results

Search: Posts Made By: krux_rap
2,864
Posted By krux_rap
Postgre Query results as Email HTML table
Hello,

I'm trying to send email from Greenplum query results as HTML table with status Red/Green

Select Server, Last_Date from Table;

Results

Server, Last_Date
Prod, 2018-04-09

Final...
1,432
Posted By krux_rap
Thanks vgersh. Updated the input data.
Thanks vgersh. Updated the input data.
5,014
Posted By krux_rap
Thanks Tyler. Worked.
Thanks Tyler. Worked.
1,432
Posted By krux_rap
Compare Values in a Delimited Text file
Hi,

How do I compare two columns within a text file

If 2nd column values are same then I want to know 3rd column number matches or not

Example:


Prod Stag1 1234.79
Prod Stag2 1234.79...
5,014
Posted By krux_rap
A few questions to get more information: 1)...
A few questions to get more information:

1) Could you check again if that output is really for 20180105 and not 20170705 ?

Yes I still see same output for both inputs

$ perl...
5,014
Posted By krux_rap
Thanks Tyler!. This was Awesome and complete...
Thanks Tyler!. This was Awesome and complete script. But One issue I was facing, see below input for 20180105


perl get_quarter_dates.pl 20180105
2016-07-01 2016-09-30
2016-10-01 2016-12-31...
5,014
Posted By krux_rap
For example, if the process is run on 4-Oct-2017,...
For example, if the process is run on 4-Oct-2017, then:
1) "File 1" has dates of Quarter 1 i.e. 01-Jul-2017 to 30-Sep-2017
2) What dates does "File 2" have?
We will be generating only 1 quarter...
5,014
Posted By krux_rap
Shell Script to Loop through Quarter dates
Hi,

Trying to automate a Postgres query using Shell script

Every month 1st week has to run a Monthly Queries to generate delimited files.

July 1st start of fiscal yr which has 4 Quarters...
2,835
Posted By krux_rap
Perfect. Thanks, MadeInGermany.
Perfect. Thanks, MadeInGermany.
2,835
Posted By krux_rap
Hi Jim, #!/bin/bash cd /starting/path ...
Hi Jim,

#!/bin/bash
cd /starting/path
find -maxdepth 1 -mtime +10 -type d | sort |
while read -r dir
do
n=0
find "$dir" -type f -exec (( n++ )) \; #-exec rm {} \;
...
2,835
Posted By krux_rap
Thanks, Jim. find "$dir" -type f -exec...
Thanks, Jim.

find "$dir" -type f -exec (( n++ )) -exec rm {} \;

how to test without -exec rm {} ?

Regards,
Karthik
2,835
Posted By krux_rap
Purge X old days files and Print count
Hello All,


I am trying to purge X old days of files from directory & Sub directories

./2016-01-13/1500/abc.txt
./2016-01-14/1605/caf.txt
./2016-01-14/1605/caf2.txt...
3,326
Posted By krux_rap
Bash for checking and copy Daily files and send an email
Hello,

Trying to get a bash for files received on daily basis and want to copy those files to different directory and send an email notification if file exists then send the file counts else Alert...
4,821
Posted By krux_rap
AWS S3 with Bash Script
Hello All,

I am trying few stuff on Amazon S3 move files to EC2 (Ubuntu Server)

I am receiving daily 2 files in S# bucket


XYZ_2015-02-26_ 200.csv
ABC_2015-02-26_ 200.csv


I want to...
1,716
Posted By krux_rap
Thanks Chubler... I used following command...
Thanks Chubler...

I used following command to get the nearest result.


split -l $(( $( wc -l < file_name ) / 16 + 1 )) -d -a 2 filename expectedfilename
1,716
Posted By krux_rap
Split and rename files
Hello,

Need to split files into n number of files and rename the files

Example:


Input:

transaction.txt.1aa
transaction.txt.1ab
......

Output:

transaction.txt.1...
14,292
Posted By krux_rap
awk to find and replace Double quotes between pipes
Hello,

Need a AWK command to find and replace Double Quotes in Pipe delimited files

Actully its a CSV file converted to Pipe but the double quotes still exists. So i want to Get rid of them.
...
9,832
Posted By krux_rap
Perfect. Thanks guys. I will build the script to...
Perfect. Thanks guys. I will build the script to handle other situation too.
9,832
Posted By krux_rap
Yoda Thanks a lot, Can you please explain me...
Yoda Thanks a lot, Can you please explain me whats going on with that statement.

I am new to AWK commands.
9,832
Posted By krux_rap
Column with New Line in CSV file
Hello,

Got a CSV file which contains 21 columns

Need to convert the file to Pipe delimiter and Few columns text data contains new line

Example


1,2,3,"ABC" 8" ABC,5,6,7
1,2,3,"ABC"
8"...
39,258
Posted By krux_rap
Bash Script: Send files to SFTP using Expect
I have to send few gzipped files from local server to SFTP server.

My Server Info

Distributor ID: Ubuntu Description: Ubuntu 12.04.4 LTS Release: 12.04 Codename: precise

Created a bash...
2,329
Posted By krux_rap
I found the issue....its not normal Characters......
I found the issue....its not normal Characters...

<89> was in blue which was same as ^M character (CTRL-V + M).
I need to find out whats the equivalent shortcut for <89> too
2,329
Posted By krux_rap
its not working ....tried it already any...
its not working ....tried it already

any other way....just struck on this issue
2,329
Posted By krux_rap
Pattern search
Hi all,

Need to find and replace characters like

+<89> to a
+<84> to u


When i do perl -pi -e 's/+<89>/a/g'

its not working...when i want to search in vi editor with :/+<89>

Can...
2,878
Posted By krux_rap
Read line with particular number of lines
Hi all,

I have a file sample.txt
abc
asd
adf
daf
adw
add
adv
wdf

I want to control the number of lines to read

Like if i give input as ./script_name 2 5

required output
asd
adf...
Showing results 1 to 25 of 38

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