Search Results

Search: Posts Made By: oldtrash
10,194
Posted By oldtrash
Folks, It all worked fine until i hit a filename...
Folks, It all worked fine until i hit a filename with spaces in between.. how do i overcome this?
ex..
i tried on files "a.txt", "b.txt", "c d.txt", i got..
mv: cannot stat `c': No such file or...
2,458
Posted By oldtrash
flags inside .cshrc
Hi,

I use a specific utility in my .cshrc for setting up the right fonts and I believe it's sufficient to run it once for a whole session.

Since I have sourced it in my .cshrc, it runs every...
43,507
Posted By oldtrash
Hi Vino, Madhan, Thanks for the inputs.. As...
Hi Vino, Madhan,

Thanks for the inputs.. As mentioned, it is not working in my system.. Is there any other thought?

Thanks,
Balaji
43,507
Posted By oldtrash
edit file using sed (not create another!)
Hi,

I generally use Perl for this
ex.
perl -e 's/pattern/replace/g' -p -i <filename>

I did something like this..

find . -type f -exec perl -e 's/pattern/replace/g' -p -i {} \;

I want...
20,057
Posted By oldtrash
Last element from cut
Hi,

I am looking for a way to get the last element of a cut command

ex.

$pwd
/remote/username/dir1/dir2/dir3

$pwd | cut -f3 -d/
username

I need to extract "dir3" (last one) no matter...
4,157
Posted By oldtrash
:) That's cool.. Out of the box solution.. ...
:) That's cool.. Out of the box solution..
Thanks to all replied..
4,157
Posted By oldtrash
Filtering/Finding a "Fortune" message
Hi,

I have had a problem in Linux with the "Fortune" messages (unfortunately! :( ) and I need to trap the message again. It starts with a "IMPORTANT NOTICE".

To capture this, I write a script...
33,510
Posted By oldtrash
ftp from unix to windows
Hi,

I have been using ftp to transfer files back and forth between windows and unix machines. But everytime i started the ftp session from the windows machine.

I have a question why I am not...
3,140
Posted By oldtrash
Thanks Perderabo, I did this in Perl using ...
Thanks Perderabo,

I did this in Perl using

s/\([abc]+ (\w+)\)/$1/g


Thanks again!
3,140
Posted By oldtrash
matching multiple times in same line
Hi,
I am stuck with pattern matching.

I need to match a particular pattern several times in a same line and replace them.

for ex.,
I need to convert

(abc XY) (bvf ZY) bla bla

to

XY...
4,722
Posted By oldtrash
Thanks Optimus, It worked. Thanks Pressy...
Thanks Optimus,
It worked.

Thanks Pressy for looking into this.

:)
4,722
Posted By oldtrash
No luck!
No luck!
4,722
Posted By oldtrash
Hi Optimus, Thanks for the reply. I forgot...
Hi Optimus,
Thanks for the reply.
I forgot to mention my trials with sed and perl..

I tried

old>sed -e "s/current_dir/`pwd`/" < old_file > new_file
sed:command garbled:...
4,722
Posted By oldtrash
replacing with `pwd`
Hi E(uni)xperts,

I have a file in which I need to replace some text with the current path of the execution.

meaning..

if I am running from

/user/oldtrash/scripts and the file contains
...
1,726
Posted By oldtrash
okay.. i made it work like this.. ...
okay.. i made it work like this..

#!/usr/bin/csh
ps -ef | grep dtwm | grep -v grep;
if ( $status == 1 ) then
dtwm &;
exit;
else
echo "dtwm is already running...";
exit;
endif

thanks for...
1,726
Posted By oldtrash
sorry for the typo, it is actually echo...
sorry for the typo, it is actually

echo "dtwm is running"

still giving problem..

-..-
10,188
Posted By oldtrash
sed -e 's/^/Honey /g' < input_file_name >...
sed -e 's/^/Honey /g' < input_file_name > output_file_name

Hope it works..

-..-
1,726
Posted By oldtrash
what if "if" ?
I use

SunOS in40-wwas1 5.8 Generic_108528-17 sun4u sparc SUNW,Sun-Fire-480R

I have a file with the following..
when I run this, I get error.. "Missing ]"


#!/bin/csh
ps -ef | grep dtwm |...
10,235
Posted By oldtrash
They are different processes.. It may or may...
They are different processes..
It may or may not call the other and there is no order..

I am running Perl5 under cshell.

Thanks
10,235
Posted By oldtrash
Perl: export variable to shell
Hi,
I am running a series of scripts and I need to transport a particular variable across many scripts. I thougt of defining an environmental variable which I could access through. But I found that...
Showing results 1 to 20 of 20

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