Sponsored Content
Top Forums UNIX for Beginners Questions & Answers How To Retreive Files With a Special Condition? Post 303019576 by apmcd47 on Monday 2nd of July 2018 11:28:07 AM
Old 07-02-2018
Quote:
Originally Posted by april
Well, here is what I got when I typed in
Code:
uname -a

Code:
Linux (server name) 3.0.101-108.52-default #1 SMP Tue May 29 19:42:53 UTC 2018 (80e6815) x86_64 x86_64 x86_64 GNU/Linux

As far as the ls version, i do not know how to search for that.
Code:
ls --version

if it is a Gnu ls (which is most likey given your OS)
Quote:
The files do not start with an A. I just happened to pick that as examples. There are numbers imbedded in the file names which are the dates & times the files were received and created.
Please post examples of filenames in the directory. The above solutions are based on your example file names.

Andrew
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Trying to retreive and compare value

Hi All, I'm have a file test.txt that looks like this 1939399393 03094994949 948383 I have to check whether the first character in the first line is 1 or not. I have tried the following option but it seems to fail head -1 test.txt | grep ^1 but it seems to display the entire... (3 Replies)
Discussion started by: omahablues
3 Replies

2. Shell Programming and Scripting

How to filer a line in special condition?

Hi, I hava log file which has the following output : Created RELEASE in dist/filename_release_1_0_20090210.zip Created RELEASE in dist/filename_release_1_1_20090210.zip Created RELEASE in dist/filename_release_1_3_20090210.zip Created RELEASE in... (6 Replies)
Discussion started by: bhaskar_m
6 Replies

3. Shell Programming and Scripting

How to insert a character in line in Special condition?

Hi, I have a log file generated by a tool which has the following look : /tmp/releases/directory/datefilename1_release_date.zip /tmp/releases/directory/datefilename2_release_date.zip /tmp/releases/directory/datefilename3_release_date.zip... (8 Replies)
Discussion started by: bhaskar_m
8 Replies

4. Shell Programming and Scripting

How to compare 2 files & get only few columns based on a condition related to both files?

Hiiiii friends I have 2 files which contains huge data & few lines of it are as shown below File1: b.dat(which has 21 columns) SSR 1976 8 12 13 10 44.00 39.0700 70.7800 7.0 0 0.00 0 2.78 0.00 0.00 0 0.00 2.78 0 NULL ISC 1976 8 12 22 32 37.39 36.2942 70.7338... (6 Replies)
Discussion started by: reva
6 Replies

5. UNIX for Dummies Questions & Answers

Strings with Special chars in IF condition

I was trying to run a code to check if a fax number is empty or not. for that, I've written the following code which is throwing an error. #!/bin/ksh fax= "999-999-9999" if ; then fax_no="000-000-0000" else fax_no=$fax fi echo $fax_no And I get the... (7 Replies)
Discussion started by: hooaamai
7 Replies

6. Shell Programming and Scripting

to add special tag to a column based on column condition

Hi All, I have following html code <TR><TD>9</TD><TD>AR_TVR_TBS </TD><TD>85000</TD><TD>39938</TD><TD>54212</TD><TD>46</TD></TR> <TR><TD>10</TD><TD>ASCV_SMY_TBS </TD><TD>69880</TD><TD>33316</TD><TD>45698</TD><TD>47</TD></TR> <TR><TD>11</TD><TD>ARC_TBS ... (9 Replies)
Discussion started by: ckwan
9 Replies

7. Shell Programming and Scripting

Print every 5 lines with special condition

Hi Friends, I have an input file like this chr1 100 200 chr1 200 300 chr1 300 400 chr1 400 500 chr1 500 600 chr1 600 700 chr1 700 800 chr1 800 900 chr1 900 920 chr1 940 960 I would like to get the first line's second column and the fifth line's 3rd column as one single line. This... (13 Replies)
Discussion started by: jacobs.smith
13 Replies

8. Shell Programming and Scripting

If condition matching with special chars

Hi, I have file #cat drivers.txt fcs0 fcs1 vscsi1 vscsi2 In this i need to check the availabality of "fcs" or "vscsi" alone not vscsi0,fcs1 I tried with "if condition" but it is not working. cat drivers.txt| while read ADAP do echo "Checking for $ADAP" if ;then echo "FC... (9 Replies)
Discussion started by: ksgnathan
9 Replies

9. Shell Programming and Scripting

Columns to Rows - Transpose - Special Condition

Hi Friends, Hope all is well. I have an input file like this a gene1 10 b gene1 2 c gene2 20 c gene3 10 d gene4 5 e gene5 6 Steps to reach output. 1. Print unique values of column1 as column of the matrix, which will be a b c (5 Replies)
Discussion started by: jacobs.smith
5 Replies

10. Shell Programming and Scripting

If condition fails for special charecter

I have a sample server name listed in variable as below: var="server-13" I need to check if the 7th character on $var is number 1 whichenv=`echo "$var"| head -c 7 | tail -c 1` if ]; then echo "9 found" else echo "9 Not Found" fi Output: This works... (3 Replies)
Discussion started by: mohtashims
3 Replies
Net::Sieve::Script::Condition(3pm)			User Contributed Perl Documentation			Net::Sieve::Script::Condition(3pm)

NAME
Net::Sieve::Script::Condition - parse and write conditions in sieve scripts SYNOPSIS
use Net::Sieve::Script::Condition; my $cond = Net::Sieve::Script::Condition->new('header'); $cond->match_type(':contains'); $cond->key_list('"[Test4]"'); $cond->header_list('"Subject"'); print $cond->write(); or my $cond = Net::Sieve::Script::Condition->new( 'anyof ( header :contains "Subject" "[Test]", header :contains "Subject" "[Test2]")' ); print $cond->write(); DESCRIPTION
Parse and write condition part of Sieve rules, see Net::Sieve::Script. Support RFC 5228, 5231 (relationnal) and regex draft CONSTRUCTOR
new Match and set accessors for each condition object in conditions tree, "test" is mandatory Internal id : id for condition, set by creation order condition : array of sub conditions parent : parent of sub condition AllConds : array of pointers for all conditions Condition parts not : 'not' or nothing test : 'header', 'address', 'exists', ... key_list : "subject" or ["To", "Cc"] header_list : "text" or ["text1", "text2"] address_part : ':all ', ':localpart ', ... match_type : ':is ', ':contains ', ... comparator : string part METHODS
equals Purpose : test conditions Return : 1 on equals conditions write Purpose : write rule conditions in text format Return : multi-line formated text AUTHOR
Yves Agostini CPAN ID: YVESAGO Univ Metz agostini@univ-metz.fr http://www.crium.univ-metz.fr COPYRIGHT
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of the license can be found in the LICENSE file included with this module. perl v5.10.0 2008-09-15 Net::Sieve::Script::Condition(3pm)
All times are GMT -4. The time now is 08:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy