Search Results

Search: Posts Made By: iliya24
2,797
Posted By rbatte1
The expression ' [A-Da-f]' as you have typed it...
The expression ' [A-Da-f]' as you have typed it (including the space) is to match against strings that simply contain the ranges of characters listed, that is A, B, C, D, a, b, c, d, e or f after a...
2,797
Posted By rbatte1
This is known as a useless use of cat There...
This is known as a useless use of cat

There is no point running the cat command. It costs you a process and it's much neater to write:-

grep '^[A-Da-f]' f1 >> f2

This will get all lines...
2,797
Posted By hanson44
Yes, exactly right. Piping takes input from...
Yes, exactly right. Piping takes input from previous command output.
cat f1 >> f2 | grep '^[A-Da-F]' is all messed up.

It should be [^A-Da-f] or ^[A-Da-f] depending on what you are trying to do....
2,054
Posted By RudiC
You need to use several commands and redirection...
You need to use several commands and redirection to achieve what you want. One (amongst many) example were:$ head -5 file2 >fileX;cat file1 >>fileX; tail -n+6 file2 >>fileX, assuming you want to...
2,054
Posted By hanson44
You can't do that with cat. "cat file1 file2"...
You can't do that with cat. "cat file1 file2" always places file2 at the end of file1. cat does not look for intermediate positions within files.

Could you provide a short example of file1 and...
1,378
Posted By Don Cragun
In case the previous comments were too cryptic,...
In case the previous comments were too cryptic, the command:
find . –type d –name "?d*" –print
will look for files in or under the current directory (.) of type directory (-type d) with a name that...
1,378
Posted By CarloM
Any single character. See Shell Command...
Any single character.

See Shell Command Language (http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_13) (and note that find uses pattern matching notation, not...
1,378
Posted By verdepollo
That's a wildcard, not a regular expression ("?"...
That's a wildcard, not a regular expression ("?" stands for a single character).

Some implementations of "find" support "regex" and "iregex" flags.
Showing results 1 to 8 of 8

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