Search Results

Search: Posts Made By: Dhruva
2,912
Posted By Dhruva
if [ -d $my_path ] then echo "path exist" ...
if [ -d $my_path ]
then
echo "path exist"
fi

or

[[ -d $my_path ]] && echo "path exist"
15,778
Posted By Dhruva
you can copy contents of dos formatted floopy to...
you can copy contents of dos formatted floopy to AIX.

if you want to read contents of dos formatted floppy on AIX simply use command.below command will give you contents of floopy.

dosdir a:
...
7,030
Posted By Dhruva
you dont need to use loop here. grep -l...
you dont need to use loop here.

grep -l "UBO888.gnt" /directorypath/* >logfile

if you are in same directory where all files are present then simply.
grep -l "UBO888.gnt" * >logfile
14,528
Posted By Dhruva
There are plenty of posts here about sending...
There are plenty of posts here about sending mail.As a simple command here is one

mutt -a /filepath/filename -s "mail subject" email_ids@somedomain.com </path/filename_body

-a option specify...
7,882
Posted By Dhruva
i checked with your suggestion.But i dont think...
i checked with your suggestion.But i dont think so that command name should change,as it is same in solaris. anyway same ans.

$ man dos2aix
Manual entry for dos2aix not found or not installed.
7,882
Posted By Dhruva
I dont see "dos2unix" command in AIX. $ man...
I dont see "dos2unix" command in AIX.

$ man dos2unix
Manual entry for dos2unix not found or not installed.
12,832
Posted By Dhruva
good to know it solved your problem.you can keep...
good to know it solved your problem.you can keep exception block there as there was small typo from my end which caused error

EXCEPTION WHEN NO_DATA_FOUND THEN
out_value:=null; -- it was...
3,719
Posted By Dhruva
Please check if you have write permission in...
Please check if you have write permission in directory where you are creating your consolidated file.

Other option is to give some other directory where you have write permission,mention that path...
1,414
Posted By Dhruva
Here is the command grep -o "wordpattern"...
Here is the command
grep -o "wordpattern" filename|wc -l
14,601
Posted By Dhruva
I have posted today about the same problem.You...
I have posted today about the same problem.You just need to copy paste.

Please check this link https://www.unix.com/shell-programming-scripting/82370-problems-sqlplus-shellscript.html
2,022
Posted By Dhruva
You can use cut command as you had a doubt about...
You can use cut command as you had a doubt about cut.

cut -f'2' -d':' filename
9,984
Posted By Dhruva
One of many ways to remove spaces: tr -d "...
One of many ways to remove spaces:

tr -d " " <testout>testout1

Above command will remove all spaces from testout and generate new file testout1.
Go ahead with any kind of processing.
12,832
Posted By Dhruva
Here is script
Here is script
2,634
Posted By Dhruva
use double quotes around variables and arguments.
use double quotes around variables and arguments.
3,872
Posted By Dhruva
I agree if the task is to count number of...
I agree if the task is to count number of occurrences, we can't stop early.I assumed and suggested if he do not need count and he is using count for the sake of test condition then this can be the...
30,395
Posted By Dhruva
here is small example.I am calling test1.sh in...
here is small example.I am calling test1.sh in test2.sh.
contents of file1

#test1.sh is the file name
echo "this is inner script"
echo "inner"

contents of file2
#test2.sh
echo "this is...
3,872
Posted By Dhruva
you can check grep with -l option or -m 1 option ...
you can check grep with -l option or -m 1 option

like

somevariable=`grep -l "searchstring" filename`

The above command will return a filename if any search pattern found.it will terminate...
3,230
Posted By Dhruva
grep -l "searchstring" filename Please...
grep -l "searchstring" filename

Please see man command for the help text.
3,872
Posted By Dhruva
I guess you should not use the below line ...
I guess you should not use the below line
count=`cat $1 | grep -c "$2"`
Instead use the above command with slight modification
count=`grep -c "$2" $1`

I want to mention you are using cat...
3,388
Posted By Dhruva
I assume you are logging in oracle database from...
I assume you are logging in oracle database from unix by sqlplus command and once you enter to oracle database you run your sql query.

Hence the problem is with your query and certainly not a unix...
4,998
Posted By Dhruva
Below is the script.There are steps which could...
Below is the script.There are steps which could have clubbed with other steps but I kept them separate for clarity.See if this script helps you.
...
2,657
Posted By Dhruva
This code will work but you need to chk one...
This code will work but you need to chk one thing,the code 226.
ftp -nvi ipaddress <<EOF >logfile.txt
user username password
lcd /local directory path
cd /Remote directory path
put filename
bye...
2,657
Posted By Dhruva
Script is fine and result it is giving is as...
Script is fine and result it is giving is as expected.If you can frame what result you are looking for then we can give a shot.
Forum: HP-UX 03-13-2008
4,446
Posted By Dhruva
Can you please share what error or problem you...
Can you please share what error or problem you are facing.
14,133
Posted By Dhruva
Run set command on your prompt to see contents...
Run
set command on your prompt to see contents in PATH variable.The shell searches the PATH in order.
/bin:/usr/local:/usr/ucb:/usr/bin
/bin has higher precedence..and so on.
Showing results 1 to 25 of 247

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