Search Results

Search: Posts Made By: braindrain
1,920
Posted By braindrain
SED for XML's
Hi
My xml has element like below

<BOOK>:</BOOK>

If i wanna replace ":</BOOK>" with ": </BOOK>" i.e 3 spaces added.

what should be the search pattern?

I tried with "?:\<\/BOOK\>",...
2,243
Posted By braindrain
To be precise, my file_master can have...
To be precise,
my file_master can have following character, field1 need to be converted to field2 ( \,+\-,\\ etc)



Ofcourse I can do with multiple sed's
like below

sed -e 's,÷,\\,g' $src >...
2,243
Posted By braindrain
aigles/shell_life, thanks for the reponse. ...
aigles/shell_life, thanks for the reponse.

fyi, I'm trying to replace all the special characters like
Ø Ù Ú Û Ü Ý Þ ß etc.,

For those charcter you mentioned(spaces, backslash, single quote,...
2,243
Posted By braindrain
Updating file in loop
Hi,
I have a file list containing list of characters to be searched and replaced 'file_master'. I have a datafile 'file_data'.
Now, in a loop how do I ensure I'm updating the latest updated...
2,829
Posted By braindrain
treating special chars
Hi,

I need some advise on treating non printable chars over ascii value 126

Case 1 :
On some fields in the text , I need to retiain then 'as-is' and load to a database.I understand it also...
9,500
Posted By braindrain
Wild card in find perm
Hi,
Is there a way to use find command to list the directories for certain permissions. I know we can use find . -type d -perm nnn, where nnn is the permission number . However I wold like to know...
1,706
Posted By braindrain
sed question
Can someone tellme how to replace a text with linebreakfollowed by the input text.

i.e
input
10103060GMT yyyy 102005050GMT xxxx ....

the expected output is

10103060GMT yyyy
102005050GMT...
2,873
Posted By braindrain
Hi Anbu, thanks, it will work, but it will also...
Hi Anbu,
thanks, it will work, but it will also search and replace as wildcard "searchsting*", but my requirement is to confine the search to the string,

i.e

d=/CEL
echo $d | sed -e...
2,873
Posted By braindrain
Okay I almost nailed out , " double Quotes" with...
Okay I almost nailed out , " double Quotes" with appropriate escape chars does the trick, but missing one and important thing towards the last step.

while read d;do
for l in `cat $2`
do
echo...
2,873
Posted By braindrain
Hi, Unfortunately it may not always at the...
Hi,

Unfortunately it may not always at the begining of line and if iam not wrong in sed ^ refers to non-matching.

Anyway, i could figure out something, but fiddling around to finid out a way ...
2,873
Posted By braindrain
Possible to restrict SED ?
Hi,

I guess by default SED looks for any occurences anywhere in the file or text. Is it possible to restrict the search to replace only for the complete pattern .

I have data file like
...
20,147
Posted By braindrain
remove certain part of file name
Hi,
Is it possible to remove the first part of the file name using find.

i.e i have something like 2006abc.txt , 1007bed.txt etc,
I wanna rename them to abc.txt , bed.txt

I tried some...
12,125
Posted By braindrain
Reading multiple lines as single
Hi,
Is it possible to read every 2 lines as single record, I have a file like below,

~CZK ~TSCHECHISCHE KRONE ~TSCHECH. REPUBLIK
Dec 1 2005 12:00AM~ ...
44,510
Posted By braindrain
Excellent !! Thanks, Small question, In...
Excellent !! Thanks,

Small question,

In the statement, what does %/* infer to,
$echo ${var%/*}

I have come across
${var-nvar} if var unassigned return nvar, ${var+nvar}, if var assigned...
44,510
Posted By braindrain
reverse of basename
Hi,
Can someone let me know how to find the reverse of the basename i.e
i have /apps/tiv/pmon/xxxx.dat and I want /apps/tiv/pmon/

Thanks
3,752
Posted By braindrain
thanks a lot !!
thanks a lot !!
3,752
Posted By braindrain
I would like to change certain directories UMASK,...
I would like to change certain directories UMASK, so that whatever file created under them, the will have 660 privilege , umask wont help here ??
3,752
Posted By braindrain
umask with find
Hi,
Will umask work with find command ?

I was trying to do

find /newdir/apps/ -type d -name 'par' -print -exec umask 117 {} \;

it returns with

find: umask: Permission denied ,

I've...
3,756
Posted By braindrain
Thx, good to know that, can you or someone knows...
Thx, good to know that, can you or someone knows if this applicable to linux suse flavour also ?
3,756
Posted By braindrain
set UID on linux
Hi,
I just want to know if it's possible to set the UID bit for a script, so that it executes not as a owner of process, but owner of the script.

i.e
script tesh.sh owned by 'user1', 'file1'...
8,704
Posted By braindrain
Hi, thankx, so it can be done only for the...
Hi,
thankx, so it can be done only for the running process . If I want for ANY process by a user it cannot be done right ?
8,704
Posted By braindrain
Nice the process on user level
Hi there,
I was wandering, if it is possible to nice set of process on user level.
Say, I have user1,user2
if user1 spawns 12 process and user2 spwans 15 process, Is there a way can I change the...
57,815
Posted By braindrain
Thanks a lot !!
Thanks a lot !!
57,815
Posted By braindrain
Strip all non-alphanumerics
Hi,
Can someone let me know how do I strip out any non-alphanumeric character in string tomake it alphanumeric?

i.e
abc def ghi ->abcdefghi
abc-def-ghi ->abcdefghi
abc#def-ghi->abcdefghi

...
15,136
Posted By braindrain
mail server used by mailx/rmail
hi,
can someone tell me how to findout the email server/outgoing SMTP used by rmail or mailx program ?
Showing results 1 to 25 of 67

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