02-20-2015
Thanks to everyone for the reply. The awk command by RudiC solved the problem.
Many thanks again for the prompt response
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I'll be reading user name and password from the person while running a shell
script so that he is authenticated.
The challenge here is to read the password variable without displaying on screen. Is there a way?
I presently do it displaying it on the screen as
echo " please enter your... (9 Replies)
Discussion started by: dayanandra
9 Replies
2. Shell Programming and Scripting
Hi All,
I had a file called Input.txt, i need to group up in a single line as 1=ttt and the no of lines may vary bewteen the 1=ttt
cat Input.txt
1=ttt,2=xxxxxx, 3=4545
44545, 4=66667
7777, 5=77723
1=ttt, 2=xxxxxx, 3=34436 66
3545, 4=66666, 5=ffffff, 6=uuuuuuu
1=ttt, 2=xxxxxx,... (4 Replies)
Discussion started by: manosubsulo
4 Replies
3. Shell Programming and Scripting
I am using the while-loop to read a file.
The file has lines with null-terminated strings (words, actually.)
What I have by that reading - just a first word up to '\0'!
I need to have whole string up to 'new line' - (LF, 10#10, 16#A)
What I am doing wrong?
#make file 'grb' with... (6 Replies)
Discussion started by: alex_5161
6 Replies
4. Shell Programming and Scripting
Hi Mates,
I require help in the following:
I have the following file snmp.txt
Wed Mar 2 16:02:39 SGT 2011
Class : mmTrapBladeS
origin : 10.0.0.0
hostname : 10.0.0.2
msg : IBM Blade Alert:
Calendar Index : 10.0.0.2-IBMBLADE
Fri Mar 4 07:10:54 SGT 2011
Class : mmTrapBladeS... (2 Replies)
Discussion started by: dbashyam
2 Replies
5. Emergency UNIX and Linux Support
Hi,
I need a way to grab the total combines since inception, total pages read from webalizer on my centos server or any other location (as long as since inception) and display the result live on my website
So with each visit it would be increasing, or perhaps live (ajax) not sure
But can... (0 Replies)
Discussion started by: lawstudent
0 Replies
6. Shell Programming and Scripting
Hi All,
I'm trying to figure out which are the trusted-ips and which are not using a script file.. I have a file named 'ip-list.txt' which contains some ip addresses and another file named 'trusted-ip-list.txt' which also contains some ip addresses. I want to read a line from... (4 Replies)
Discussion started by: mjavalkar
4 Replies
7. Shell Programming and Scripting
I am making a script that reads in the model of a car and then searches a file and displays the make model and price of anything matching the input provided. here is what I have so far
#!/bin/sh
echo Please enter a car model:
read model
if test $? -eq 0
then
grep $model /home/cars
awk... (4 Replies)
Discussion started by: subway69
4 Replies
8. UNIX for Dummies Questions & Answers
Hi all,
How can i display the middle line of a file using a single line command? (6 Replies)
Discussion started by: Lakme Pemmaiah
6 Replies
9. Shell Programming and Scripting
Hello,
I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be:
SRVXPAPI001 ERRO JUN24 07:28:34 1775
REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F
... (8 Replies)
Discussion started by: Ferocci
8 Replies
10. Shell Programming and Scripting
Hi all,
I have a log file say Test.log that gets updated continuously and it has data in pipe separated format. A sample log file would look like:
<date1>|<data1>|<url1>|<result1>
<date2>|<data2>|<url2>|<result2>
<date3>|<data3>|<url3>|<result3>
<date4>|<data4>|<url4>|<result4>
What I... (3 Replies)
Discussion started by: pat_pramod
3 Replies
LEARN ABOUT DEBIAN
net::cli::interact::action
Net::CLI::Interact::Action(3pm) User Contributed Perl Documentation Net::CLI::Interact::Action(3pm)
NAME
Net::CLI::Interact::Action - Sent data or matched response from connected device
VERSION
version 1.121640
DESCRIPTION
This class is used internally by Net::CLI::Interact and it's unlikely that an end-user will need to make use of Action objects directly.
The interface is documented here as a matter of record.
An Action object represents either some kind of text or command to send to a connected device, or a regular expression matching the
response from a connected device. Such Actions are built up into ActionSets which describe a conversation with the connected device.
If the Action is a "send" type, then after execution it can be cloned and augmented with the response text of the command. If the response
is likely to be paged, then the Action may also store instruction in how to trigger and consume the pages.
INTERFACE
type
Denotes the kind of Action, which may be "send" or "match".
value
In the case of "send", a String command to send to the device. In the case of "match", a regular expression reference to match response
from the device. In special circumstances an array reference of regular expression references is also valid, and each will be checked for a
match against the device response.
no_ors
Only applies to the "send" kind. Whether to skip appending the output record separator (newline) to the "send" command when sent to the
connected device.
continuation
Only applies to the "send" kind. When response output is likely to be paged, this stores an ActionSet that contains two Actions: one for
the "match" which indicates output has paused at the end of a page, and one for the "send" command which triggers printing of the next
page.
params
Only applies to the "send" kind, and contains a list of parameters which are substituted into the "value" using Perl's "sprintf" function.
Insufficient parameters causes "sprintf" to die.
num_params
Only applies to the "send" kind, and returns the number of parameters which are required for the current "value". Used for error checking
when setting "params".
response
A stash for the returned prompt which matched and triggered the end of this action.
response_stash
A stash for the returned output following a "send" command, but not including the matched prompt which ended the action. This slot is used
by the "match" action as it slurps output, but the content is then transferred over to the partner "send" in the ActionSet.
prompt_hit
When a command is successfully issued, the response is terminated by a prompt. However that prompt can be one of a list, defined in the
Action. This slot records the regular expression from that list which was actually matched.
clone
Returns a new Action, which is a shallow clone of the existing one. All the reference based slots will share data, but you can add (for
example) a "response" without affecting the original Action. Used when preparing to execute an Action which has been retrieved from the
Phrasebook.
AUTHOR
Oliver Gorwits <oliver@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2012 by Oliver Gorwits.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
perl v5.14.2 2012-06-12 Net::CLI::Interact::Action(3pm)