Hi friends
i have unix shell command as below
egrep -v '^..,00|^..,69'
i need to convert into win batch script.
please help.
help for command
Moderator: DosItHelp
-
- Posts: 21
- Joined: 16 Aug 2019 23:35
Re: help for command
to more understand
i have file test.txt , and data as below in file.
id,pin,call
1,2,1212
2,3,12121
now i have unix command as below, which i want to convert into batch script
egrep -v '^..,00|^..,12' test.txt
i have file test.txt , and data as below in file.
id,pin,call
1,2,1212
2,3,12121
now i have unix command as below, which i want to convert into batch script
egrep -v '^..,00|^..,12' test.txt
Re: help for command
So your question is intended just for people that know Unix, right?
Sorry, but I don't know Unix. Perhaps if I could see what is the result you want, I could write a Batch script for that...
Or you may post this request on a Unix forum.
Antonio
Sorry, but I don't know Unix. Perhaps if I could see what is the result you want, I could write a Batch script for that...
Or you may post this request on a Unix forum.
Antonio
-
- Posts: 21
- Joined: 16 Aug 2019 23:35
Re: help for command
please write batch script....
Re: help for command
The way I understand the pattern is quite similar to the findstr syntax.
-v reverse the meaning of the pattern (like /v for findstr)
^ match the beginning of the line
.. wildcards for two characters
,00 literally matched
So I guess in Batch it would be
The output for test.txt with the following content …
... would be ...
Steffen
-v reverse the meaning of the pattern (like /v for findstr)
^ match the beginning of the line
.. wildcards for two characters
,00 literally matched
So I guess in Batch it would be
Code: Select all
findstr /v "^..,00 ^..,12" "test.txt"
Code: Select all
id,pin,call
1,2,1212
2,3,12121
3,12,1212
44,12,1212
5,00,1212
67,00,1212
Code: Select all
id,pin,call
1,2,1212
2,3,12121
3,12,1212
5,00,1212
No! You have to explain what the unix command does for people that are not familiar with unix. How should we know? All I did above is guessing.please write batch script....
Steffen
-
- Posts: 21
- Joined: 16 Aug 2019 23:35
Re: help for command
Thanks aGerman
aGerman wrote: ↑30 Oct 2019 08:38The way I understand the pattern is quite similar to the findstr syntax.
-v reverse the meaning of the pattern (like /v for findstr)
^ match the beginning of the line
.. wildcards for two characters
,00 literally matched
So I guess in Batch it would beThe output for test.txt with the following content …Code: Select all
findstr /v "^..,00 ^..,12" "test.txt"
... would be ...Code: Select all
id,pin,call 1,2,1212 2,3,12121 3,12,1212 44,12,1212 5,00,1212 67,00,1212
Code: Select all
id,pin,call 1,2,1212 2,3,12121 3,12,1212 5,00,1212
No! You have to explain what the unix command does for people that are not familiar with unix. How should we know? All I did above is guessing.please write batch script....
Steffen