How do I change directories to a path given by input variable in Korn Shell?
e.g. I tired with the Korn Shell below but it doesn't work.
----------------------------------
#!/bin/ksh
echo "Enter folder name: \c"
read folder
cd $folder
----------------------------------
Any help will... (5 Replies)
Could someone tell me the code for doing the below inside a k shell?
I have a file file below:
$ more file1
>>>>>
AAA
BBB
CCC
<<<<<
>>>>>
DDD
EEE
FFF
<<<<<
I want the lines between ">>>>>" and "<<<<<" to be one line like below:
AAA BBB CCC (2 Replies)
Dear All,
I have an input file like this
interface Serial10/0/7:11.1 point-to-point
description CLIENT:SA_INSTITUTO ANGLO MEXICANO Sitio Metepec 104452:0,165
bandwidth 64
ip vrf forwarding INSTITUTO-ANGLO
ip address 192.168.148.217 255.255.255.252
no ip directed-broadcast
frame-relay... (2 Replies)
I am trying to query a table having 3 columns, the third column is a field of varchar(1024) with a SQL string in it. I am using cut command to split out the three fields into three variables. I do a db2 command to extract the data into a file.
My problem is with the third field having the SQL... (3 Replies)
i need to search the starting line
example we have
-sh
shl-js-gd
i need to search only starting -sh not the other
i have used cmd
cat filename | grep '-'
but it will check for complete - in the file
please help me to search only starting -
thank u
revenna (0 Replies)
I have a file test.txt and i need to grep pattern "A.17" from that file.
I know cat test.txt | grep A.17 will return the pattern, but it is returing like
# VERSION=A.17
How can i take only A.17 from this
if A.17 is found,
... do something
if not found
... do something
Please... (11 Replies)
Hi I want a script which should basically do
1. If the size of the file is 0kb,
send email to some list od ppl
2. if the size of the file is other than 0kb
send email to someother list...
Pls help (2 Replies)
Hi All,
I need to split a flatfile based on it's first character, I am using the following script
awk '{print > "TEST_substr($0,1,1).txt"}' PROVIDER.txt
It is returning files
TEST_1 and
TEST_2
But I am not getting the .txt file extension.
I need the files like
TEST_1.txt and ... (1 Reply)
Hi,
I have trouble building the logic for the following, could anyone please help me out with this:
Im working on a wrapper script to check for input files (in a specific directory) and pass
the input files along with the options as parameters to the main script.The options vary depending ... (2 Replies)
I want to take out the Z1 value from the lscfg outpu and use the below command to get it
lscfg -vl hdisk0 | grep "Device Specific.(Z1)" | awk -F. '{print $NF}'
# lscfg -vpl hdisk0
.
.
Device Specific.(Z0)........0000063268181002
Device Specific.(Z1)........020064a
.
And it works,... (2 Replies)
Discussion started by: moorthikv
2 Replies
LEARN ABOUT DEBIAN
log::message::item
Log::Message::Item(3perl) Perl Programmers Reference Guide Log::Message::Item(3perl)NAME
Log::Message::Item - Message objects for Log::Message
SYNOPSIS
# Implicitly used by Log::Message to create Log::Message::Item objects
print "this is the message's id: ", $item->id;
print "this is the message stored: ", $item->message;
print "this is when it happened: ", $item->when;
print "the message was tagged: ", $item->tag;
print "this was the severity level: ", $item->level;
$item->remove; # delete the item from the stack it was on
# Besides these methods, you can also call the handlers on
# the object specifically.
# See the Log::Message::Handlers manpage for documentation on what
# handlers are available by default and how to add your own
DESCRIPTION
Log::Message::Item is a class that generates generic Log items. These items are stored on a Log::Message stack, so see the Log::Message
manpage about details how to retrieve them.
You should probably not create new items by yourself, but use the storing mechanism provided by Log::Message.
However, the accessors and handlers are of interest if you want to do fine tuning of how your messages are handled.
The accessors and methods are described below, the handlers are documented in the Log::Message::Handlers manpage.
Methods and Accessors
remove
Calling remove will remove the object from the stack it was on, so it will not show up any more in subsequent fetches of messages.
You can still call accessors and handlers on it however, to handle it as you will.
id
Returns the internal ID of the item. This may be useful for comparing since the ID is incremented each time a new item is created.
Therefore, an item with ID 4 must have been logged before an item with ID 9.
when
Returns the timestamp of when the message was logged
message
The actual message that was stored
level
The severity type of this message, as well as the name of the handler that was called upon storing it.
tag
Returns the identification tag that was put on the message.
shortmess
Returns the equivalent of a "Carp::shortmess" for this item. See the "Carp" manpage for details.
longmess
Returns the equivalent of a "Carp::longmess" for this item, which is essentially a stack trace. See the "Carp" manpage for details.
parent
Returns a reference to the Log::Message object that stored this item. This is useful if you want to have access to the full stack in a
handler.
SEE ALSO
Log::Message, Log::Message::Handlers, Log::Message::Config
AUTHOR
This module by Jos Boumans <kane@cpan.org>.
Acknowledgements
Thanks to Ann Barcomb for her suggestions.
COPYRIGHT
This module is copyright (c) 2002 Jos Boumans <kane@cpan.org>. All rights reserved.
This library is free software; you may redistribute and/or modify it under the same terms as Perl itself.
perl v5.14.2 2011-09-19 Log::Message::Item(3perl)