Visit Our UNIX and Linux User Community

Full Discussion: Get a data and save
Top Forums UNIX for Dummies Questions & Answers Get a data and save Post 302945264 by sabercats on Wednesday 27th of May 2015 04:50:55 PM
Old 05-27-2015
Get a data and save

If I have a A.log
Code:
1 Air Flow Monitor     : 34.070 Degrees C
2 Air Flow Monitor     : 41.730 Degrees C
3 Air Flow Monitor     : 35.340 Degrees C
4 Air Flow Monitor     : 33.370 Degrees C
5 Air Flow Monitor     : 36.770 Degrees C
6 Air Flow Monitor     : 45.910 Degrees C
7 Air Flow Monitor     : 33.690 Degrees C
8 Air Flow Monitor     : 33.580 Degrees C

How do you write a shell script to collect what number of Air flow with temperature >= 40.00 degrees C? and save it in A_high.log ?
Code:
 
2 Air Flow Monitor     : 41.730 Degrees C
6 Air Flow Monitor     : 45.910 Degrees C

Thanks,
 
Test Your Knowledge in Computers #948
Difficulty: Easy
A computer virus is a type of computer program that, when executed, replicates itself by modifying other computer programs and inserting its own code.
True or False?

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

SCO Unix : how to read and save data from cd

Dear All How to read the data on my cd and save these data in a dpecial folder Regards (0 Replies)
Discussion started by: sak900354
0 Replies

2. Filesystems, Disks and Memory

Can ZFS Save my Data

Hello, Our RAID and server recently crashed and we are trying to recover our data. The problem appears to be that the Veritas File System/Logical Volume Manger became corrupt on our RAID. We are down to our last option, which is to run some Veritas commands that "may" result in data loss. ... (1 Reply)
Discussion started by: stringman
1 Replies

3. Shell Programming and Scripting

save streaming video data for later viewing?

I have limited bandwidth in my apartment and no cable TV service. I was wondering if it is possible to write a script that would download the video data from my favorite TV shows (legally... many networks post their videos online for free) while I sleep, so that later I can watch them on my TV... (5 Replies)
Discussion started by: euclid3628800
5 Replies

4. Homework & Coursework Questions

Option to save data thats displayed?

Im trying to come up with a simple shell script to display info about the current user.`pwd`; `date` ; `who am i` I want to give the option to save all the data thats display by the commands to a log file. With a timestamp as the name of the file This is where im stuck echo "Would you like to... (3 Replies)
Discussion started by: eddieq20
3 Replies

5. UNIX Desktop Questions & Answers

Why can't I save a VI file after entering data?

Hi I am new to linux, when I typed "vi FILE1" I was able to open VI editor. I added some data and I want to save the file and I tried :w but it threw me an error. "file1" E212: Can't open file for writing Press ENTER or type command to continue why I am not able to save it? I read it... (16 Replies)
Discussion started by: chinnanji
16 Replies

6. Shell Programming and Scripting

Get Permissions and save to data

Hi all; I have the following code which gives me kind of what I need: #!/usr/bin/perl use Fcntl ':mode'; # if ($ARGV ne "") { $filename = $ARGV; } else { print "Please specify a file!\n"; exit; } # if... (2 Replies)
Discussion started by: gvolpini
2 Replies

7. Shell Programming and Scripting

Save log data in excel sheet

Hello, I have the following data format in a log file : a : x1 b : x2 c : x3 d : x4 -------- a : x5 b : x6 c : x7 d : x8 so the same fields ( a ,b ,c,d) repeated many times in the same log file but with different "x" values (x5,x6,x7,x8). I need a script to save this data in an... (6 Replies)
Discussion started by: mm00123
6 Replies

8. UNIX for Advanced & Expert Users

How to save a data of a file into a variable?

My requirement is to read a column data from a file & save it in a variable for each row & process it. I am using the below code- Leadlines="$TGTFILE/Error.txt">>$log_file while read line do id = ` echo $line | cut -d "," -f1 ` email = ` echo $line | cut -d "," -f2 ` ----------- done My... (2 Replies)
Discussion started by: saga20
2 Replies

9. Shell Programming and Scripting

Script to scrape page for and save data

Hi All I would like to get cars DB from this web site link removed , and I am trying to right script to go and parse the web page and save the data for each cars into a file, type of cars, mark, model, but when I look to the source page I found out that the first car type is preselected and the... (3 Replies)
Discussion started by: molwiko
3 Replies

10. UNIX for Beginners Questions & Answers

How to save data and run the server again / Ubuntu16.04?

Hello, I am running ubuntu 16.04 and I have rented a server three days ago. I am with OVH and during image installation I did not merge hdd partitions, just proceed with custom installation configuration. Today I rebooted and server went offline. Company says: "Connect in rescue mode and check... (4 Replies)
Discussion started by: baris35
4 Replies
Text::Flow(3pm) 					User Contributed Perl Documentation					   Text::Flow(3pm)

NAME
Text::Flow - Flexible text flowing and word wrapping for not just ASCII output. SYNOPSIS
use Text::Flow; # use it on ASCII text ... my $flow = Text::Flow->new( check_height => sub { my $paras = shift; sum(map { scalar @$_ } @$paras) <= 10; }, wrapper => Text::Flow::Wrap->new( check_width => sub { length($_[0]) < 70 } ), ); my @sections = $flow->flow($text); # @sections will now be an array of strings, each string # will contain no more than 10 lines of text each of which # will be no longer then 70 characters long # or use it on text in a PDF file ... my $flow = Text::Flow->new( check_height => sub { my $paras = shift; (sum(map { scalar @$_ } @$paras) * $pdf->get_font_height) < 200; }, wrapper => Text::Flow::Wrap->new( check_width => sub { my $string = shift; $pdf->get_string_width($string) < 100 }, ) ); my @sections = $flow->flow($text); # @sections will now be an array of strings, each string # will contain text which will fit within 200 pts and # each line will be no longer then 100 pts wide DESCRIPTION
This module provides a flexible way to wrap and flow text for both ASCII and non-ASCII outputs. Another Text Wrap module!!?!?! The main purpose of this module is to provide text wrapping and flowing features without being tied down to ASCII based output and fixed- width fonts. My needs were for a more sophisticated text control in PDF and GIF output formats in particular. METHODS
new (%params) This constructs the new Text::Flow instance, and accepts parameters for the "wrapper" and "check_height" variables. wrapper (?$wrapper) This is the accessor for the internally help Text::Flow::Wrapper instance which is used by Text::Flow to wrap the individual lines. check_height This is the accessor for the CODE ref which is used to check the height of the current paragraph. It gets as an argument, an array-ref of paragraphs, each of which is also an array-ref of text lines. The most common usage is shown in the SYNOPSIS above, but you can really do anything you want with them. It is expected to return a Boolean value, true if the height is still okay, and false if the max height has been reached. flow ($text) This method preforms the text flowing. It returns an array of strings which can be treated as complete blocks of text. It will handle paragraph breaks and line breaks for you. Introspection meta Returns the Moose meta object associated with this class. TODO
I wanted to write some tests for using this with GD modules as well. I suppose we will have to wait until 0.02 for that. SIMILAR MODULES
There are a bunch of other text wrapping and flowing modules out there, but they are all meant for use in ASCII outout only. This just didn't work for my needs, so I wrote this one. If you need to wrap ASCII text and want to do it in a much simpler manner then this module provides, then I suggest checking out those modules. This module is specifically made for when those other modules are no longer powerful and flexible enough. BUGS
All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT. AUTHOR
Stevan Little <stevan@iinteractive.com> COPYRIGHT AND LICENSE
Copyright 2007 by Infinity Interactive, Inc. <http://www.iinteractive.com> This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.10.1 2007-05-21 Text::Flow(3pm)

Featured Tech Videos

All times are GMT -4. The time now is 03:50 AM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy