dbt in syntax
+4
akalya
Vineet_More
Christopher
SakeenaHarris
8 posters
Page 2 of 2 • 1, 2
Re: dbt in syntax
sorry i didn't check the command with all possible filenames.
christopher is rite it ll display all the filenames starting with list1 or list2.
christopher is rite it ll display all the filenames starting with list1 or list2.
urvershi- Posts : 21
Points : 70
Join date : 2010-02-26
Re: dbt in syntax
try wild carts!
like
i could get the combined output of list 1 2 3 with list 11 12 13 only by using
or by using
like
- Code:
$cat list?
- Code:
$cat list??
i could get the combined output of list 1 2 3 with list 11 12 13 only by using
- Code:
cat list? list??
or by using
- Code:
cat list*
Re: dbt in syntax
but dis command will also display content of files list4,list5,list14,list56 etc..
urvershi- Posts : 21
Points : 70
Join date : 2010-02-26
Re: dbt in syntax
ganesh that output is somewhat similar to what urvershi said.... more generalised than hers
jeeva- Posts : 50
Points : 93
Join date : 2010-03-04
Re: dbt in syntax
got the answer finally
ls |grep ^list[1-2]*$|xargs cat
found by INDHU...
ls |grep ^list[1-2]*$|xargs cat
found by INDHU...
jeeva- Posts : 50
Points : 93
Join date : 2010-03-04
Re: dbt in syntax
hey the contents of the file named "list" is also displayed!!!!
and it works even without ^
and it works even without ^
akalya- Posts : 70
Points : 86
Join date : 2010-03-04
Re: dbt in syntax
@akalya
ya ok.... thats because * denotes 0 or more occurences...
is there a way to specify 1 or more occurence!!!
ya ok.... thats because * denotes 0 or more occurences...
is there a way to specify 1 or more occurence!!!
jeeva- Posts : 50
Points : 93
Join date : 2010-03-04
Re: dbt in syntax
@akalya
actually ^ specifies it should start with "list"
incase if you have "alist" or "blist" etc.. ^ will be useful
found by INDHU again
actually ^ specifies it should start with "list"
incase if you have "alist" or "blist" etc.. ^ will be useful
found by INDHU again
jeeva- Posts : 50
Points : 93
Join date : 2010-03-04
Re: dbt in syntax
ls | grep ^list[1-2][1-2]*$ | xargs cat
this wud work i guess...
this wud work i guess...
Last edited by akalya on Mon Mar 15, 2010 6:31 pm; edited 1 time in total
akalya- Posts : 70
Points : 86
Join date : 2010-03-04
Re: dbt in syntax
oh k...thanks indhu...it works!!!!!
akalya- Posts : 70
Points : 86
Join date : 2010-03-04
Page 2 of 2 • 1, 2
Similar topics
» [SYNTAX] sed command
» [SYNTAX] tr command
» [SYNTAX] grep command
» [ SYNTAX ] Control Structures in Shell
» [SYNTAX] Working with Directories and Files
» [SYNTAX] tr command
» [SYNTAX] grep command
» [ SYNTAX ] Control Structures in Shell
» [SYNTAX] Working with Directories and Files
Permissions in this forum:
You cannot reply to topics in this forum
|
|