the remove list are variables.For example:
remove_list='_12345_ '
- this line should be removed in the old_list.txt
home/user/..../20110414/XXX_12345_20110414.txt,50.4......
Regards
Jurgen
---------- Post updated at 04:26 AM ---------- Previous update was at 04:15 AM ----------
Quote:
Originally Posted by mirni
useless use of echo. You can do without. Bigger problem is in the redirection. You are overwriting your updated_list at every run of sed.
Use in-place editing instead:
Its working if I use "sed -e" instead of "sed -i"
One additional question...how can I use also the remove list to delete the corresponding files...
Something like that
I've a very trivial thing bothering me. I'm rather new in scripting so I'll keep asking stupid questions.
Here is small script that does backup of mails.
---
for i in `cat /maildir.dir`
do
echo $i
maildir=`echo $i|sed 's@^./usr/@@'`
for j in $i/*
do
&& {
st="`find $j/backup -name "*"... (3 Replies)
Hi. I hope someone can help me with this problem.
Being a novice to Unix, I editted my crontab directly
by typing " crontab -e ". Well, I needed to make some
changes so, I typed " crontab -r ". Now I have no crontab,
and I can't seem to get crontab to write a new file.
I' ve tried:
vi... (4 Replies)
in windows machine...
C:\2\test>perl -version
This is perl, v5.6.1 built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)
------------------------------------------
what is the difference b\w subroutine calls:
sub_routine_name("-----");
and
... (2 Replies)
Hi,
I needed space on a FS, and when I've added the space on the filesystem, I did it trough the regular smitty fs inteface and not with smitty cl_lvm.
Can someone help me to repair the situat before a faileover happen ?
Thanks for your help,:mad: (13 Replies)
Hi there,
Can anyone help me find the correct expression for sed.
I want to repace iface eth0 inet wathever
with iface eth0 inet static
Thanks for your help
Santiago (5 Replies)
Hi,
I use awk but not as a programming language. Just generally in piplelines to split things out by fields.
I am trying to accomplish this one thing that I think a short awk routine would do great for, but can't figure it out.
Lets say I have a file that contains database columns. The file... (25 Replies)
cat $1 | sort -n | uniq | $1
in other words, I sort the content of the file and put the ouput in the same file, is there any mistakes in this cshell code ??? (4 Replies)
Hi everyone !
I have a file wich look like this :
>Sis01
> Sis02
...
>Sis44
I want to separe each paragraphe in a different file, so I decide to use the "FOR" loop + sed.
for f in {01..44}
do (5 Replies)
Hello, I have a file containing different words. How can i print the words which contain at least one small letter, for example if i have:
today TOMORROw 12345 123a
next preViou5 no
it should print the following:
today TOMORROw 123a
next preViou5 no
Please use code tags as required... (5 Replies)