Search Results

Search: Posts Made By: arunkumarmc
1,953
Posted By arunkumarmc
need to send files to an email id
Hi,I would like to send all the files in a particular folder to an e-mail id .I am able to send a particular file via email but that gets displayed in the email as content using the mailx option. I...
22,047
Posted By arunkumarmc
command to check whether the remote host is up or not
Hi,

My script needs to check whether the remote host is up or not.

If it is up i need to start few servers in that host or else just a notification should be sent that the remote host is...
7,232
Posted By arunkumarmc
Hi, Here is the script- #!...
Hi,

Here is the script-



#! /bin/sh

touch `date '+%m%d'`0000 TODAY
cd /auto/users-35/p494856/learning/filetransfer/
find . -name "*csv" -newer...
7,232
Posted By arunkumarmc
Issue with touch command
Hi,

I have a touch command in my script which creates / updates a file TODAY. Then i try to find the list of files which are newer than this TODAY file.


touch `date '+%m%d'`0000 TODAY
cd...
3,651
Posted By arunkumarmc
Thanks... This link is really useful!!!
Thanks... This link is really useful!!!
3,651
Posted By arunkumarmc
Hi Scott, Thanks!!! Its working fine... ...
Hi Scott,

Thanks!!! Its working fine...

---------- Post updated at 07:00 AM ---------- Previous update was at 06:59 AM ----------

Hi Guru,

I'm using C shell
Regards
Arun
3,651
Posted By arunkumarmc
Hi Scott, Wat is PS1? Could you please...
Hi Scott,

Wat is PS1? Could you please explain me in detail?

I tried with this -
PS1='$PWD $ '
echo $PS1

But i'm getting $PWD $ as the result.

Regards
Arun
3,651
Posted By arunkumarmc
Changing the shell prompt
Hi,

I want to change the shell prompt, using the cd command.

I have a shell prompt like this -


p78-mfx(dgaw1078/9781)$


Now i do this -


p78-mfx(dgaw1078/9781)$ cd log4j...
8,346
Posted By arunkumarmc
Hi Albert, I am getting only the file names....
Hi Albert,

I am getting only the file names.
CLHALL02.csv
CTHALL02.csv
DV.csv
ODHALL02.csv

I'm not getting the details of the files like -

-rw-r--r-- 1 p494856 dp 1868503 May...
8,346
Posted By arunkumarmc
Hi Albert, find . -name "*csv" -newer...
Hi Albert,

find . -name "*csv" -newer /auto/users-35/p494856/learning/scripts/TODAY -exec ls -trl {} \; > temp.txt

This is working fine and i'm not getting any errors. But I need to remove the...
8,346
Posted By arunkumarmc
Hi Madan, I tried this and it worked fine......
Hi Madan,

I tried this and it worked fine...

In another case, i need to find the files and also list them.. how can i use basename in that?

find . -name "*csv" -newer...
8,346
Posted By arunkumarmc
Hi Madan, here is my command, find ....
Hi Madan,

here is my command,

find . -name "*csv" -newer TODAY > temp1.txt

Where can i use the basename option in the above command?
8,346
Posted By arunkumarmc
Hi Albert, But I get the exception in the...
Hi Albert,

But I get the exception in the for loop itself.

for file in $(find . -name "*sh" -newer TODAY)

---------- Post updated at 09:11 AM ---------- Previous update was at 09:08 AM...
8,346
Posted By arunkumarmc
Hi Albert, When i add these in my script, i...
Hi Albert,

When i add these in my script, i am getting this exception -
syntax error at line 6: `$' unexpected

Regards
Arun
8,346
Posted By arunkumarmc
Hi Amit, In this code, find . -name...
Hi Amit,

In this code,

find . -name "*sh" -newer TODAY > temp.txt
awk -F"/" ' { print $2 } ' temp.txt

We are getting field 2 and printing it in the terminal.
Will it be possible to...
48,045
Posted By arunkumarmc
Thank u so much... I tried this and its working...
Thank u so much... I tried this and its working fine for me...

scp ~/.ssh/id_rsa.pub remote.server.com:.ssh/authorized_keys2

Should i need to execute this command for each remote server i need...
48,045
Posted By arunkumarmc
Thanks Zaxxon. I tried this - scp -p...
Thanks Zaxxon.

I tried this -

scp -p p494856@svag1017:/aorp02/orp/appdata/rprt/*.csv .

and the output came as I expected. But it asks for the password while executing this script.
I need...
48,045
Posted By arunkumarmc
preserving the timestamp of a file when copied from remote server to local server using ftp
Hi,

I need to copy few files from remote server to local server.
I write a shell script to connect to the remote server using ftp and go to that path. Now i need to copy those files in the...
8,346
Posted By arunkumarmc
Thank u so much Amit.
Thank u so much Amit.
8,346
Posted By arunkumarmc
Thanks Amit. In my case, when i try to find...
Thanks Amit.

In my case, when i try to find the files in a directory and assign it to a variable using this command -

listfiles=`find . -name "*sh" -newer TODAY`
echo $listfiles

i get the...
8,346
Posted By arunkumarmc
Extracting a substring from a string in unix
Hi,

I would like to extract a substring from a string in unix.

eg:

./checkfile.sh -- i need only checkfile.sh from this string.

Could someone help me out in this...

Regards...
14,007
Posted By arunkumarmc
Hi Scott, Sorry I misunderstood in the...
Hi Scott,

Sorry I misunderstood in the initial stage.. Now i am clear with and this command is very useful to me...
Thanks for you help!!!
14,007
Posted By arunkumarmc
Hi Scott, As i am suppose to list the...
Hi Scott,

As i am suppose to list the current date files, i meant to add it at midnight so that i will get all the files modified today.

Moreover i cant run the script again, if so this touch...
14,007
Posted By arunkumarmc
Hi Scott, Thanks for you reply. If so,...
Hi Scott,

Thanks for you reply.
If so, should i need to include this touch command in the script each time at midnight to find the list for current date files?
14,007
Posted By arunkumarmc
Hi, Thanks for you response.. Is there...
Hi,

Thanks for you response..
Is there any possibility to list the files which are created / modified today?
-mtime options list the files modified in the last 24 hrs. but I need to find files...
Showing results 1 to 25 of 26

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