Dear Unix Guru,
I have several directories as below
/home/user/
dir1
dir2
dir3
Each directory has different size. I want to print each directory size (Solaris command du -hs .)
Can you please guide me how to achieve this?
Thanks
Bala (2 Replies)
I have following problem.
<File A> contains let say 5 lines but can be changed.
cat
dog
fish
car
if I want to add word to each line then how do I go about it?
I used paste -d but that requires two files having same number of lines but
in my case <File A> changes and I just need to... (6 Replies)
I have created a file "pat".This file contains the text "abcdefghi". Now i want to count the characters in this file "pat". I gave wc -c | pat and it returns me exact count "9". Now when i tried like "echo pat | wc -m" It returns '4'. as for as i understand this command "echo pat | wc -m" should... (7 Replies)
I've been looking on the internet, and haven't found anything simple enough to use in my code. All I want to do is count how many times "-" occurs in a string of characters (as a package name). It seems it should be very simple, and shouldn't require more than one line to accomplish.
And this is... (2 Replies)
Hi,
I will use below command for grep single string ("osuser" is search string)
ex: find . -type f | xarg grep -il osuser
but i have one more string "v$session"
here i want to grep in which file these two strings are present.
any help is appreciated,
Thanks in advance.
Gagan (2 Replies)
Hi ,
i'm trying to count a particular word occurance in a whole directory..is this possible :wall:
say for example there is a directory with 100 files which and all the file may have the word 'aaa' in it ...how would i count the number of 'aaa' in those whole 100 files in a directory ?
... (10 Replies)
I have a log directory:
/logs/foo.log
/logs/bar.log
/logs/err.out
I'm trying to find a way to
> /logs/*.log
> /logs/*.out
to blank them out, but of course, that doesn't work.
Any suggestions? (4 Replies)
Hi
Can we run the linux command and per script in a single command
$ cd /usr/local/adm/ ;ctsv scmtest_qabuild ;cspec.pl scmtest
This is a combination of linux and clearcase command and last one is perl script with argument.
I can see the first and 2nd coomand is executing but last... (6 Replies)
Hello everyone,
I am new to Unix and I am stuck with a problem. I need only a single command to display the output of who and then add the total number of users and display at the bottom of that output.
Example-: (Expected output)
sreyan@debian:~$ <command>
sreyan tty7 ... (7 Replies)
can i get a simple script for , Count same word which has come many times in single lines & pars
Eg file would be ==
"Thanks heman thanks thanks
Thanks heman
thanks man"
So resullt should be
Thanks = 5
heman=2
man = 1
thanks in advance :)
Please use code tags for code and... (1 Reply)
Discussion started by: heman96
1 Replies
LEARN ABOUT MOJAVE
xml::sax::exception5.18
XML::SAX::Exception(3) User Contributed Perl Documentation XML::SAX::Exception(3)NAME
XML::SAX::Exception - Exception classes for XML::SAX
SYNOPSIS
throw XML::SAX::Exception::NotSupported(
Message => "The foo feature is not supported",
);
DESCRIPTION
This module is the base class for all SAX Exceptions, those defined in the spec as well as those that one may create for one's own SAX
errors.
There are three subclasses included, corresponding to those of the SAX spec:
XML::SAX::Exception::NotSupported
XML::SAX::Exception::NotRecognized
XML::SAX::Exception::Parse
Use them wherever you want, and as much as possible when you encounter such errors. SAX is meant to use exceptions as much as possible to
flag problems.
CREATING NEW EXCEPTION CLASSES
All you need to do to create a new exception class is:
@XML::SAX::Exception::MyException::ISA = ('XML::SAX::Exception')
The given package doesn't need to exist, it'll behave correctly this way. If your exception refines an existing exception class, then you
may also inherit from that instead of from the base class.
THROWING EXCEPTIONS
This is as simple as exemplified in the SYNOPSIS. In fact, there's nothing more to know. All you have to do is:
throw XML::SAX::Exception::MyException( Message => 'Something went wrong' );
and voila, you've thrown an exception which can be caught in an eval block.
perl v5.18.2 2011-09-14 XML::SAX::Exception(3)