Requesting help for TL1 scripting


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Requesting help for TL1 scripting
# 1  
Old 02-03-2016
Requesting help for TL1 scripting

HI Everyone,


I have TL1 script which takes the temperature of a CISCO equipment through TELNET now i need to save the output of the command to a csv file .


Like this is the output


Code:
> RTRV-SHELFSTAT:AB1S2a::1;

   AB1S2a 2016-02-03 22:29:39
M  1 COMPLD
   ":SHELF,TEMPERATURE=33C,VOLTAGEA=54469,VOLTAGEB=54442,"


i need just to get the Temperature which is 33C to a CSV file .


and i telnet to the equipment through expect script which is a child to a bash script.

Last edited by Corona688; 02-03-2016 at 04:08 PM..
# 2  
Old 02-03-2016
To keep the forums high quality for all users, please take the time to format your posts correctly.

First of all, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags [code] and [/code] by hand.)



Second, avoid adding color or different fonts and font size to your posts. Selective use of color to highlight a single word or phrase can be useful at times, but using color, in general, makes the forums harder to read, especially bright colors like red.

Third, be careful when you cut-and-paste, edit any odd characters and make sure all links are working property.

Thank You.

The UNIX and Linux Forums
# 3  
Old 02-03-2016
How about
Code:
awk 'match ($0, /TEMPERATURE=[^,]*/) {print substr ($0, RSTART+12, RLENGTH-12)}' file
33C

If happy, redirect to your .csv file.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Forum Support Area for Unregistered Users & Account Problems

User banned, requesting to revoke the ban.

My username is abhilashnair. I was banned recently for deleting my post. I wish to apologise for disregarding forum rules. I request you to revoke my ban and give me one more chance if possible, i assure you that I will abide by all rules henceforth Since this is really informative forum and rich... (3 Replies)
Discussion started by: Unregistered
3 Replies

2. Post Here to Contact Site Administrators and Moderators

Requesting a new forum

Hi admins and moderators!! Happy new year and merry Christmas :D Well, I have been here a few months now as a registered member and may be 6-7 years that I got numerous help directly and indirectly from this site as a guest. Unix.com really has a vast collection of posts on wide variety of... (15 Replies)
Discussion started by: admin_xor
15 Replies

3. Shell Programming and Scripting

how to grep the responce on TL1

Hi All, I'm a newbie here.. how can i grep the data when i receive responce from TL1 example: responce from TL1: blabalbalbalbalba.,lbalba,SUCCESFULL,blahblahbalabh... how can i grep the "SUCCESSFULL" while i'm running the script? is it possible? because i'm only to know is if... (2 Replies)
Discussion started by: nikki1200
2 Replies

4. Shell Programming and Scripting

TL1 connect and login how to using Unix.

Hi All, I'm a newbie here, I'm just wondering how can i connect and login to TL1 using Unix? is it possible? Please advise, THanks, ---------- Post updated at 03:33 PM ---------- Previous update was at 03:09 PM ---------- is there anyone know how to connect and login in TL1 using... (2 Replies)
Discussion started by: nikki1200
2 Replies

5. Shell Programming and Scripting

Requesting help with shell script

I have been viewing man pages and using google with little luck so far. I am writing a shell script using wbemcli. I can execute the command and get the results I need just fine. ex. wbemcli -nl ein 'http://<username>:<password>@<host>/<targetpc>/root/wmi:MSAcpi_ThermalZoneTemperature' ... (3 Replies)
Discussion started by: Scott Post
3 Replies

6. Shell Programming and Scripting

Requesting help to replace a string by my bash script

Hello every1, I need help to replace a string in a file by my bash script. Find: log4j.appender.toLogFile.layout.ConversionPattern= %d %5p (%F:%L) - %m%n= %d %5p (%F:%L) - %m%n Replace: log4j.appender.toLogFile.layout.ConversionPattern= %d %5p (%F:%L) - %m%n I tried by sed, but kept... (7 Replies)
Discussion started by: titanic4u
7 Replies

7. Shell Programming and Scripting

requesting available port with shell script

how do I request a new and available local port (TCP) to use with shell script? (2 Replies)
Discussion started by: timmylita
2 Replies

8. Shell Programming and Scripting

Requesting full back up scripts

hi guys linux noob here wanting to learn linux scripting, i need help with a backup script that not only allows me to back up my files but restore them to my own personal directory, had a look at some of the coding from the scripts section on this site but still lost. any help is much appreciated (8 Replies)
Discussion started by: burnie35
8 Replies

9. Shell Programming and Scripting

Requesting input and for loop

Test - Test (1 Reply)
Discussion started by: Amit Sura
1 Replies

10. Shell Programming and Scripting

Executing TL1 commands through script

HI , I have to write a script for some testing , which will telnet to a device and execute some TL1 commands.. Does any one knows how to execute TL1 commands through a script Thanks in advance Binu (1 Reply)
Discussion started by: msbinu
1 Replies
Login or Register to Ask a Question