Visit The New, Modern Unix Linux Community

Search Results

Search: Posts Made By: abhii
622
Posted By abhii
The below code fails as there will be no file...
The below code fails as there will be no file having such pattern. $i is not available in the log files at start of the day till evening.in that case the below grep fails.
grep $i...
622
Posted By abhii
Command assigned to a variable is failed or not having any data - error
Hi,

My command is getting stuck while running it.

observed that the grep command doesn't returned any data ($? was 1) and it failed.
This command is assigned into the variable and used in...
1,972
Posted By abhii
Get business days including today's date
I am trying to get last 5 business day [excluding sat and sun].
trying
for d in Mon Tue Wed Thu Fri
do
date +%Y%m%d -d "last $d"
done

gives me [provided] date
Thu Oct 20 23:56:26 EDT 2016...
1,534
Posted By abhii
Get all business days from week including today
I am trying to get last 5 business day [excluding sat and sun].
trying
for d in Mon Tue Wed Thu Fri
do
date +%Y%m%d -d "last $d"
done

gives me [provided] date
Thu Oct 20 23:56:26 EDT 2016...
1,078
Posted By abhii
Sorry for the confusion caused. have...
Sorry for the confusion caused.

have replaced code of Post #1

updatefile=$(awk '1;/$i/{exit}' $filename | awk '/upd_/ {a=$0} END{print a}' | cut -d '/' -f6 | cut -d '.' -f1 | awk 'NF{NF-=1}1'...
1,078
Posted By abhii
for me awk -v var=$i '1; $0 ~ var {exit}'...
for me awk -v var=$i '1; $0 ~ var {exit}' $filename | awk '/upd_/ {a=$0} END{print a}' | cut -d ' ' -f3
did work to get the filename with date format (what was required)

though the code you have...
1,078
Posted By abhii
Code worked. thanks
Code worked. thanks
1,078
Posted By abhii
awk -v var=$i -v var2="$filename" '1;/var/{exit}'...
awk -v var=$i -v var2="$filename" '1;/var/{exit}' $filename | awk '/upd_/ {a=$0} END{print a}' | cut -d '/' -f6 | cut -d '.' -f1 | awk 'NF{NF-=1}1' FS='_' OFS='_'
awk -v var=$i -v var2="$filename"...
1,078
Posted By abhii
for i in PUAFZ00; do echo...
for i in PUAFZ00;
do
echo =======================================================================================================================================;
echo -e " Symbol - $(tput setaf...
1,078
Posted By abhii
awk command issue
Hi All,
I am trying to perform certain task using awk command but the command is not returning expected output though it is running fine independently but not in for loop.

req:
1. I am searching...
1,632
Posted By abhii
---------- Post updated at 02:04 AM ----------...
---------- Post updated at 02:04 AM ---------- Previous update was at 02:02 AM ----------




Thanks this command is now working as expected. but the problem is that now it checking for other...
1,632
Posted By abhii
Hi, Thanks for your help and correcting me...
Hi,

Thanks for your help and correcting me as i was not applying the command in proper way. the command is working fine.
That is my concerns also as it is returing some results and skipping...
1,632
Posted By abhii
Hi, Thanks for your reply, As i mentioned...
Hi,

Thanks for your reply,
As i mentioned in folder there are 73 dat files but in result it is displaying only 35 files. rest of the files it is not checking. There is no unusual thing i...
1,632
Posted By abhii
Grep command
I am trying to search a perticular pattern in all the files in a directory except one file.

i have used exclude grep to do that:
grep -c -E '|' /interfaces/qi/archive/20130919/*.dat
is returning...
12,229
Posted By abhii
Hi Ygor, Thank for your help... that was the...
Hi Ygor,

Thank for your help... that was the only thing missing.. if ound out finally after long struggle.

anyway many thanks
12,229
Posted By abhii
[Solved] Calling PL/SQL Block into Shell Script
Hi,

i have one simple PL/SQL Block and i have saved it as .sql file, which i am trying to call from UNIX script.

PL/SQL block structure

CONNECT DB_NAME/PWD@Database
whenever SQLERROR EXIT...
1,104
Posted By abhii
SQL Script
Hi guys,

Can you help me on below scenario.

I want to run insert statements from shell script.

The script should create the insert statements(format is fixed and parameters are so). The...
904
Posted By abhii
Running a SQL Query from UNIX
Hi,

Could you please help me on this.

I have bulk of queries written in text file. I want to use those queries and want to execute from UNIX.
I don't want to run this file as a sql file as...
3,243
Posted By abhii
Queries
Hi Sanjeev,

in SQL file i am just connecting to DB. Please find the flow. I jsut need how to add unix command when you are executing any sql query in shell script
please find the flow

drop a...
3,243
Posted By abhii
Regarding executing sql query in shell script
Hi,

I have one SQL file prepared in UNIX and one script that is executing that.

In SQL i have Update and create queries.

I want to introduce conditions in SQL file (in UNIX) that if either...
1,339
Posted By abhii
Thanks for reply
cat -n filename | tail

It is giving 5424.

wc -l is giving 5423

I have one more doubt..
The first line itself is having lots of spaces.so in normal look it looks like second line which...
1,339
Posted By abhii
Sorry for wrong command
it is -nu in view mode of file which will give us the line number for each line in the file. I hope i am right here..
1,339
Posted By abhii
UNIX Query About wc -l output
I was performing the wc -l operation in one data file the result is less when i was giving -nu on the view of the file.

while giving wc -l the count is 5023
after setting line numbers in view...
Showing results 1 to 23 of 23

 

Featured Tech Videos

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