I have some files in unix
ls -1
TMH.backend.tar.421E-03.Z
TMH.backend.tar.421E-04.Z
TMH.backend.tar.421E-05.Z
TMH.backend.tar.421E-06.Z
TMH.backend.tar.421E-07.Z
TMH.backend.tar.421E-08.Z
TMH.backend.tar.421E-08.Z.bak20081223164844
TMH.backend.tar.421E-09.Z... (1 Reply)
Hi all,
I need to prune a var's content as follows:
VAR='blah blah # seew seew'
NEWVAR='blah blah'
(without blanks)
I need also to perform this change by using variable substitution within bash shell. I've tried it with the following subst:
VAR2=${VAR/ \#*/}
but the... (7 Replies)
I need to remove subdirectories that are empty and I've not done this before. First I am going through the files to remove old records. Then if the directory is empty I want to delete it. There are files in /direcotry/images/fs* - 0-9 and a-z The fs* directories need to stay, but any directories... (4 Replies)
Greetings everyone. Right now I am working on a script to be used during automated deployment of servers. What I have to do is remove localhost.localdomain and localhost6.localdomain6 from the /etc/hosts file. Simple, right? Except most of the examples I've found using sed want to delete the entire... (4 Replies)
Hi There,
Can anybody help me out for searching this regular expression?
xxxxx.yyy.zzzz.From-ABCD.To-XYZ.xxxxxx
I would like the ID1 and ID2 (knowing which one is Id1 and id2)
.From-<ID1>.
and
.To-<ID2>.
Thanks in advance!!
Regards,
Bhaskar (4 Replies)
How to do alternation using regular expressions in the 'find' command? Like say you want to find all files that do not match the names specifically "this" or "that" within a directory using regular expressions? (10 Replies)
I'm trying to use regular expression arguments as variables. I have to surround the regular expression with double quotes or else it automatically expands that regular expression to whatever is in that directory.
Unfortunately when I run 'find' it further surrounds the double quotes with single... (6 Replies)
Hello, ksh on Sun5.8 here. I have a pipe-delimited, variable length record file with sub-segments identified with a tilda that we receive from a source outside of our control. The records are huge, and Perl seems to be the only shell that can handle the huge lines. I am new to Perl, and am... (8 Replies)
The bash below executes and does find all the .bam files in each R_2019 folder. However set -x shows that the .bam extension only gets removed from one .bam file in each folder (appears to be the last in each). Why is it not removing the extension from each (this is $SAMPLE)? Thank you :).
set... (4 Replies)