Search Results

Search: Posts Made By: Master_Mind
Forum: Shell Programming and Scripting 2 Weeks Ago
1,002
Posted By Master_Mind
How to add the entry with this option ? can you...
How to add the entry with this option ? can you help with my script

0 * * * * script_path/my_script.sh
Forum: Shell Programming and Scripting 2 Weeks Ago
1,002
Posted By Master_Mind
Hi, Thanks for the inputs, Basically the...
Hi,
Thanks for the inputs, Basically the crontab entry is only enabled for root users. I wanted to run my script using test user rather than as root. So is there a way to run as test user while...
Forum: Shell Programming and Scripting 2 Weeks Ago
1,002
Posted By Master_Mind
To run crontab script with specific user
Hi Guys,

I am have made a below entry in crontab using root user and need to trigger the script every one hour using test user.
But the script is not getting triggered. Could anyone help
OS -...
1,942
Posted By Master_Mind
Yup, I tried but its returning 1 for success...
Yup, I tried but its returning 1 for success return and 9 for failure if i give $? after executing unzip -t
1,942
Posted By Master_Mind
Yup Its working, Can you help me how to apply...
Yup Its working, Can you help me how to apply this in my script like how to check whether its successful or not.
1,942
Posted By Master_Mind
Thanks Neo, But its not working gzip -t...
Thanks Neo, But its not working

gzip -t file.zip

gzip: file.zip: not in gzip format
1,942
Posted By Master_Mind
Validate compressed files
Hi All,

I have zip file that needs to be validated and checked for 5 times with sleep of 60 seconds. Some thing like below


#!/bin/bash
counter=1
while [ "$counter" -le 5 ]
do
curl...
3,325
Posted By Master_Mind
To add multiple columns in csv file
Hi Guys,

Can you help to add static values at the end of the csv file with headers


input_file
id,name
1,neo
2,pull

Expected
id,name,status,entry,g_id...
3,187
Posted By Master_Mind
Will this work code=$1 if [ $counter...
Will this work


code=$1
if [ $counter -eq 3 ];then
[[ "${code}" = 'JP' ]] && nohup sh script.sh $val 1 &
fi
3,187
Posted By Master_Mind
No errors basically, Is it possible to achieve in...
No errors basically, Is it possible to achieve in the same command to check for $code condition
nohup sh script.sh $val 1 &
3,187
Posted By Master_Mind
Trigger script based on condition
Hi Guys,

I am having below code which runs based on condition, Is it possible to check condition at the time of trigger


code=$1
if [ $counter -eq 3 ];then
nohup sh script.sh $val 1 &...
2,486
Posted By Master_Mind
Ignore dollar value in sed
Hi Guys,

I need to replace the string based on specific value by keeping dollar sign

input=$1
var=$(echo "@code_temp_table_$value_table"| sed -r...
2,956
Posted By Master_Mind
Thanks RudiC for your help. But is there a way to...
Thanks RudiC for your help. But is there a way to tweak the existing code itself


final_var=$(echo "source_table_@ctry_final"| sed -e "s/\@ctry/${ctry_input}/")

why i am saying is because you...
2,956
Posted By Master_Mind
Let me be clear once again as per below code, i...
Let me be clear once again as per below code, i am getting ctry_input as input to my shell program. Where in if i get countries like nz,usa,uk then source should be replaced as diff

...
2,956
Posted By Master_Mind
But expected would be below. source string needs...
But expected would be below. source string needs to be replaced with diff


diff_table_usa_final


Shell is bash
2,956
Posted By Master_Mind
Replace a string based on input
I am trying to read a value from a mapping file and would need to replace the value based on country parameter

source_table_@ctry_final
Expected
final_var=source_table_aus_final


If the...
1,425
Posted By Master_Mind
Those counts will be always identical, So will it...
Those counts will be always identical, So will it work ?
1,425
Posted By Master_Mind
Assign value to variable
Hi Guys,

I need to assign the value of which has rows to a variable, Can you advise how to do that


hive --orcfiledump /hdfs_path/ | grep "Rows"
Rows: 131554


I need to assign this row...
Forum: Programming 05-29-2019
10,717
Posted By Master_Mind
I tried something like this but not able to...
I tried something like this but not able to calculate the days out of this

hive -e 'desc formatted db.table_name' | grep CreateTime
Forum: Programming 05-29-2019
10,717
Posted By Master_Mind
Yes i did that but i am struck to get the created...
Yes i did that but i am struck to get the created date and location, so that i can able to use 90 days logic. Can you advise how this can be done using scripting
Forum: Programming 05-29-2019
10,717
Posted By Master_Mind
How you can get using sql, I need to check the...
How you can get using sql, I need to check the hive tables which are created 90 days before and drop those tables
Forum: Programming 05-29-2019
10,717
Posted By Master_Mind
I am using Hive CLI but how can i able to check...
I am using Hive CLI but how can i able to check 90 days created

desc formatted my_table;
Forum: Programming 05-29-2019
10,717
Posted By Master_Mind
How to arhive hive external tables?
Hi Guys,

Is there a way to check hive external tables which are created 90 days before and drop those tables along with underlying hdfs data. Can this be achieved in unix script?
329
Posted By Master_Mind
To get latest hdfs file system
Hi All,

I am having below hdfs file system


/user/home/dte=2019_01_30/part_1
/user/home/dte=2019_01_30/part_2
/user/home/dte=2019_01_31/part_1


I need to take the latest month hdfs...
308
Posted By Master_Mind
To trigger script on particular instance
Hi Guys,

I have a main_script.sh which runs every day and scheduled in crontab.

in the main script i read data from config file


test.config
apple
mango
orange



main_script.sh...
Showing results 1 to 25 of 67

 

Featured Tech Videos

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