Search Results

Search: Posts Made By: InduInduIndu
1,718
Posted By RudiC
In case elements of Array2 are identical to the...
In case elements of Array2 are identical to the ones of Array1 (which they are not, "new" - "New") and count of elements in Array2 is equal to the count of Array3 (which it is not, 3 - 4 due to space...
4,647
Posted By jim mcnamara
Assuming the directory structures are the same,...
Assuming the directory structures are the same, i.e., 5 levels:


find /level1/level2/level3/*/logs -type f -mtime +30 -exec rm {} \;


TEST first:

find /level1/level2/level3/*/logs -type f...
32,647
Posted By RudiC
You say (post #8) that you are using bash. Array...
You say (post #8) that you are using bash. Array indexing in bash starts from 0 and counts up to ${#arr[@]} - 1 , as stated earlier. In both your posts #8 and #10, you are starting the while loop for...
970
Posted By zaxxon
I assume this is the way to go; not sure if there...
I assume this is the way to go; not sure if there is a shorter sed-stlye way to match first without having to use the if:

$ echo bazfoobar | perl -pe 'if($_ =~ /baz/){s/foo/bar/g}'
bazbarbar

...
Showing results 1 to 4 of 4

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