Search Results

Search: Posts Made By: arun888
1,713
Posted By RavinderSingh13
Hello arun888, Considering that |1.77 into...
Hello arun888,

Considering that |1.77 into your first line of Input_file is a typo as I can't see that in your shown output. So following may help you in same.

awk -F"|"...
1,562
Posted By Don Cragun
I don't understand what you want. Your script...
I don't understand what you want. Your script doesn't produce any output (other than the exit code).

Add echo or printf or some other statements producing the output you want to include in your...
1,562
Posted By Don Cragun
You can't write to a log file after you exit. ...
You can't write to a log file after you exit.

Why do you care if the exit status is stored in a variable before you write it?

What is the name of the log file?

Do you want to append data to...
1,567
Posted By RudiC
That's because of the single quotes, which...
That's because of the single quotes, which prohibit shell's variable expansion. Use double quotes instead.
1,567
Posted By Don Cragun
Try changing: #!/usr/bin/ksh #clientcheck.ksh...
Try changing:
#!/usr/bin/ksh
#clientcheck.ksh zxx
#set -x
hn=`hostname`
if [[ $hn = "us" ]]
then
case $1 in
ban) client_home='/comps/banking'
;;
man) ...
1,567
Posted By RavinderSingh13
Hello Arun, Could you please change if [[...
Hello Arun,

Could you please change if [[ $hn = "us" ]] to if [[ "$hn" == "us" ]] and let me know if this helps.
EDIT: Thank you Don, I think Don has given perfect solution, please try that...
1,567
Posted By Don Cragun
This isn't likely to help. (It will help if and...
This isn't likely to help. (It will help if and only if hostname aborts or returns a host name containing whitespace characters.)

The problem shown in the trace is that the operand passed to the...
1,246
Posted By cero
There are different line terminators in the unix...
There are different line terminators in the unix and the windows world. To add the line endings windows editors understand there are 2 ways:
Create the text with the needed endings:
printf "First...
3,563
Posted By Don Cragun
Assuming you still want to look for the file in a...
Assuming you still want to look for the file in a subdirectory of the directories you named for the ADUS files and the PROM files corresponding to the week number named in the file you're processing,...
3,563
Posted By Aia
Hi arun888 If you do not mind to learn some...
Hi arun888
If you do not mind to learn some more
You do not need to use the command cat there; the command tail can do the same by itself
tail -4 input.txt

By the way, there should be only four...
1,246
Posted By RavinderSingh13
Hello arun888, You can use following. ...
Hello arun888,

You can use following.

cat Input_file | uuencode Input_file | mailx -s"test" ravinder.singh@chumma.com

Make sure you have uuencode command in your box.


...
1,246
Posted By cero
Hi, you feed notavail.txt to uuencode and...
Hi,

you feed notavail.txt to uuencode and then feed uuencodes output too mailx. You do not see any email body because only the encoded content of your textfile arrives at mailx. For a mail body...
3,563
Posted By Don Cragun
Perhaps something like: #!/bin/ksh ...
Perhaps something like:
#!/bin/ksh
ADUSf=adus.txt
ADUSp=/retail/market/salil
NONEf=none.txt
PROMf=prom.txt
PROMp=/retail/market/loki
rm -f "$ADUSf" "$NONEf" "$PROMf"
while IFS=. read head...
3,563
Posted By RavinderSingh13
Hello aurn, Following may help you in same. ...
Hello aurn,

Following may help you in same.

###One liner form:
while read line; do ZERO=0; ls -l $line > /dev/null 2>&1; if [[ $? -eq $ZERO ]]; then echo "File named $line found."; else echo...
1,319
Posted By derekludwig
Arun, You've redirected STDIN twice, you'll...
Arun,

You've redirected STDIN twice, you'll need to remove < /dev/null from the command line.

- DL
1,319
Posted By RudiC
If simply.txt is just ASCII text, try mailx -s...
If simply.txt is just ASCII text, try mailx -s "Alert Email for JOBS Failed for week $week" arunkumar@trival.com <simply.txt
1,224
Posted By Peasant
Why not use sqlldr with input file ? With it...
Why not use sqlldr with input file ?

With it you have two possible paths.
Parsing input using complex control file or loading data into temporary table as is with simple control file, then do...
1,346
Posted By Don Cragun
The string consisting of 45 spaces followed by a...
The string consisting of 45 spaces followed by a "1" is not the same as the string "1". To get what you seem to want you could use any of the following:

Change out=`cat bit.txt` to read out <...
2,540
Posted By Aia
In this case you do not need awk to extract the...
In this case you do not need awk to extract the information.
i.e.
#!/bin/bash

while IFS='[, ]' read job location sales; do
echo $location
echo $sales
done < test.txt



...
2,540
Posted By RudiC
unix_count is a variable local to the sqlplus...
unix_count is a variable local to the sqlplus script and can't be used outside. And, count will remain empty as the sql output is going into unix_count.
Remove the space in front of the EOF token.
2,540
Posted By RavinderSingh13
Hello Arun, Could you please try following...
Hello Arun,

Could you please try following and let me know if this helps. Off course I haven't tested it.

while IFS='[,]' read locationinp sales;
do
location_id=`echo $locationinp | cut -d'...
1,175
Posted By Scrutinizer
Perhaps you could write it more like something...
Perhaps you could write it more like something like this (untested) :

get_sales_info () {
loc_code=$1
sqlplus -S /NOLOG << EOF
CONNECT dbs/passwd@dbtod
SET head off
select...
1,454
Posted By jim mcnamara
LOCATION="$1" rather than LOCATION=&1, I...
LOCATION="$1" rather than LOCATION=&1, I believe.
LOCATION is taking its value form the commandline invocation of the shell script, it seems.
1,175
Posted By RavinderSingh13
Hello Arun, Following is an example for...
Hello Arun,

Following is an example for same, hope this may help you.
Input_file:

cat function_check
chennai
salem
banglore
trichy
tripur
Punjab
Code is as follows for an example.
...
1,175
Posted By neutronscott
you read a variable called location and then use...
you read a variable called location and then use tests on store. Is this the whole script?

You also use ` ... ` inside of $( ... ). Both are for command substitution. Neither are necessary because...
Showing results 1 to 25 of 36

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