Search Results

Search: Posts Made By: cmarzan
1,809
Posted By Don Cragun
Assuming that you're using a shell that performs...
Assuming that you're using a shell that performs basic POSIX-required parameter expansions, Scrutinizer already gave you two ways to do what you want in post #6 in this thread.

If you aren't using...
1,299
Posted By Don Cragun
If you really mean all files, try: for i in .*...
If you really mean all files, try:
for i in .* *
do
[ -e "$i" ] || continue
msg
aaa imp -U$AAAUSER -P$AAAUSERPWD <$i>>$curdir/import_tap.out -Jutf8
done
If you don't want "." files, drop...
2,598
Posted By RudiC
Try cd ${value%/*}
Try cd ${value%/*}
2,598
Posted By RavinderSingh13
Hello cmarzan, Could you please be clear in...
Hello cmarzan,

Could you please be clear in your requirement, as 1st post says you only need to find file in subdirectories and do an operation. Now the script you have posted having some...
2,598
Posted By RavinderSingh13
Hello cmarzan, You need not to put cat...
Hello cmarzan,

You need not to put cat check_file_status.ksh in the script as this was my script name which I have created for the task you have requested for, sorry for same.
For showing you...
2,598
Posted By Aia
I think you could do that with just one call to...
I think you could do that with just one call to find

find /path/to/MainFolder -type f -name "file.cmd" -exec mv -t /path/to/MainFolder/Sub-folder_2/Sub-folder_2.1 {} \;

Test it first with:...
2,598
Posted By RavinderSingh13
Hello camarzan, Following may help you in...
Hello camarzan,

Following may help you in same. I have made similar kind of folder structure and checked it worked for me, please check and let me know if this helps.


cat...
2,598
Posted By RavinderSingh13
Hello cmarzan, Following may help you in...
Hello cmarzan,

Following may help you in same.


find -type d -name "test11" ### For checking a directory
AND
find -type f -name "test12*" ### For checking a file


Output will be as...
680
Posted By gull04
Hi, To chck for a directory, you would want...
Hi,

To chck for a directory, you would want to use,if [ -d Dirname ]
then
echo "directory exits."
else
echo "directory is NOT there."
fi

Regards

Dave
680
Posted By RavinderSingh13
Hello cmarzan, -f filename is true if a...
Hello cmarzan,

-f filename is true if a file exits and it is a regular file or not. You can refer man test also for same.

Following is an example for same.

if [ -f Filename ]
then
...
691
Posted By Aia
There should be a space after [ and before ] ,...
There should be a space after [ and before ] , like so:
if [ $ret_patch == 99 ]
Showing results 1 to 11 of 11

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