Sponsored Content
Full Discussion: Basic IF Command Question
Top Forums UNIX for Dummies Questions & Answers Basic IF Command Question Post 302521893 by cwl on Thursday 12th of May 2011 03:53:32 PM
Old 05-12-2011
Basic IF Command Question

Hi,

I have a months worth of data that I need to separate into weekly files. There is a date column with dates in the following format: YYYYMMDD.

I'm thinking I can create the weekly files by using a grep command combined with an IF command and specify each day of the specific week I'm extracting within the if command. Does this seem efficient? How would I set up the IF command?

cwl
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

basic question

I have some basic doubts. Can someone clarify in this forum? 1)if then eval ' tset -s -Q -m ':?hp' ' else eval ' tset -s -Q ' what does it exactly mean in .profile? 2) what are 'nobody' and 'noaccess' usernames in /etc/passwd file. ... (3 Replies)
Discussion started by: asutoshch
3 Replies

2. UNIX for Dummies Questions & Answers

basic question

hey...when i type who...what does "pts" field mean??? eg pts 0 etc (1 Reply)
Discussion started by: urwannabefriend
1 Replies

3. UNIX for Dummies Questions & Answers

Very Basic Question

How to know if my AIX 5.2 is running at 64bits? THANKS (5 Replies)
Discussion started by: GermanSkull
5 Replies

4. UNIX for Dummies Questions & Answers

Really basic question....

Hello all. Let me start off by saying I know a little more then it seems by me asking this question... here goes I have an old 486 box and I want to start messing around with unix. I've been taking classes for 3 or 4 years in c programming in unix, so I am used to the commands and such, but I... (1 Reply)
Discussion started by: robherms
1 Replies

5. Programming

q_zero question basic C

What am I doing wrong?... My code looks like this: #include <stdio.h> float answer; /* The result of our calculation */ int main() { answer = 1.0 / 3.0; printf(“The value of 1/3 is %f\n”, answer); return (0); } ==============================END And this is... (4 Replies)
Discussion started by: gumigecko
4 Replies

6. HP-UX

Basic OS question

Could someone tell me the command to find out the OS version which will give 12 character not the 9 characters(which is usually machine id). uname -i gives machine id and uname -a is more comprehensive way to look. Thanks! (4 Replies)
Discussion started by: catwomen
4 Replies

7. Shell Programming and Scripting

basic question

hi, I have a basic question,, i am in a directory called /intas/OCU_3.9.1/sbin ocuut1@france>mv itsa_tcs itsa_tcs_old mv: itsa_tcs_old: rename: Permission denied i am logging as the owner of the file. when i am doing this i am getting the above error of permission denied. I know... (3 Replies)
Discussion started by: namishtiwari
3 Replies

8. Shell Programming and Scripting

basic nc question

i'm doing this in one terminal: nc -lu 7402 and it appears to start listening properly, then in another i do this: echo "hello" | nc -u localhost 7402 and nothing happens on the listening terminal - what am i doing wrong? thanks. (7 Replies)
Discussion started by: peterworth
7 Replies

9. UNIX for Dummies Questions & Answers

Basic awk question...getting awk to act on $1 of the command itself

I have a script problem that I am not able to solve due my very limited understanding of unix/awk. This is the contents of test.sh awk '{print $1}' From the prompt if I enter: ./test.sh Hello World I would expect to see "Hello" but all I get is a blank line. Only then if I enter "Hello... (2 Replies)
Discussion started by: JasonHamm
2 Replies

10. UNIX for Beginners Questions & Answers

Basic Linux command line question

:D:D:D These are list of command i typed on opensuse terminal and evolve lots of doubt around ,that i can't answer. COMMAND 1 linux-xavv:/ # cd COMMAND 2 linux-xavv:~ # Does above command 1 and command two with red labelled sign make different meaning or same . 1 linux-xavv:/... (1 Reply)
Discussion started by: lobsang
1 Replies
CFETOOLUPDATE(8)					User Contributed Perl Documentation					  CFETOOLUPDATE(8)

NAME
cfetoolupdate - Update the database with a new value SYNOPSIS
cfetool update name --value|-V value [--path|-p directory name] [--time|-t seconds] [--daily|-d] [--weekly|-w] [--yearly|-y] [--cfenvd|-c] [--histograms|-H] [--verbose|-v] [--help|-h] DESCRIPTION
Takes a new value and uses it to update the database specified by name, located at the path specified by the -p argument, or the current working directory if the -p argument is omitted. The value will be associated with the current time, unless the -t option is given. In order for cfetool to function properly, this command should be issued at least once during each interval specified by the --step option of "cfetool create". The -d, -w and -y options specify the databases to update. If all three options are omitted, only the weekly database will be updated. OPTIONS
--value|-v value Specifies a new value to update the database with. --path|-p directory name The directory in which the database specified by name can be found. --time|-t The time the value was collected, in seconds since epoch (January 1st, 1970). If this argument is omitted, the current time will be used. --daily|-d Update the daily averages database. --weekly|-w Update the weekly averages database. --yearly|-y Update the yearly averages database. --cfenvd|-c Communicate with cfengine. If this option is specified, cfetool will define classes understandable by cfagent. For more information, refer to the documentation for cfenvd. --histograms|-H Collect histogram information about the probability distribiution of fluctuations about the mean value over all times of day. Cfetool won't write anything to this file for the first four weeks, as it has to have reliable mean values in order to accurately calculate it. --verbose|-v Print details of the command's execution to the standard output stream. --help|-h Print a short help message and then exit. OUTPUT
Before exiting, "cfetool update" will print one line to the standard output stream in the following format: yrly=ynum,wkly=wnum,dly=dnum ynum, wnum and dnum will be either the number 0 if the corresponding database was not updated, or a code indicating the state of the given statistic, as compared to an average of equivalent earlier times, as specified below: code high|low|normal meaning ------------------------------------------------------------- -2 - no sigma variation ------------------------------------------------------------- -4 low within noise threshold, and within -5 normal 2 standard deviations from -6 high expected value ------------------------------------------------------------- -14 low microanomaly: within noise -15 normal threshold, but 2 or more standard -16 high deviations from expected value ------------------------------------------------------------- -24 low normal; within 1 standard deviation -25 normal from the expected value -26 high ------------------------------------------------------------- -34 low dev1; more than 1 standard -35 normal deviation from the expected -36 high value ------------------------------------------------------------ -44 low dev2; more than 2 standard -45 normal deviations from the expected -46 high value ------------------------------------------------------------- -54 low anomaly; more than 3 standard -55 normal deviations from the expected -56 high value Where "low" indicates that the current value is below both the expected value for the current time position, and the global average value. "high" indicates that the current value is above those values. "normal" indicates that the current value is within the range of expected values. "cfetool update" also exits with a code corresponding to the above table. If more than one database is being updated, the most negative result from the updates is returned, and the individual results must be obtained from the standard output stream, as described above. EXAMPLE
% cfetool update temperature --path /my/path --value 14.5 --histograms yrly=0,wkly=-6,dly=0 Updates the weekly temperature database and histogram files located in /my/path/ with the value 14.5 using the current time as the update time. The output indicates that only a weekly database was updated, and the new value given was within cfetool's noise threshold, and also within 2 standard deviations of the previous average stored in the database. AUTHORS
The code and documentation were contributed by Stanford Linear Accelerator Center, a department of Stanford University. This documentation was written by Elizabeth Cassell <e_a_c@mailsnare.net> and Alf Wachsmann <alfw@slac.stanford.edu> COPYRIGHT AND DISCLAIMER
Copyright 2004 Alf Wachsmann <alfw@slac.stanford.edu> and Elizabeth Cassell <e_a_c@mailsnare.net> All rights reserved. perl v5.8.4 2004-09-21 CFETOOLUPDATE(8)
All times are GMT -4. The time now is 07:16 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy