Microsoft
Software
Hardware
Network
Question : cmd FOR /f tokens 2* doesn't work
Morning gents,
Have trouble with a cmd string, which should work....
I need to find all text in file C:\zzsticker.txt after "L3= "
In the attached file there is a line: L3= Zebra ZM400
Below cmd lines would show only Zebra, and not token 3 !
For /F "tokens=2-3" %a in ( 'FIND /i "L3= " C:\zzsticker.txt' ) do set L3=%a
For /F "tokens=2*" %a in ( 'FIND /i "L3= " C:\zzsticker.txt' ) do set L3=%a
For /F "tokens=2,3" %a in ( 'FIND /i "L3= " C:\zzsticker.txt' ) do set L3=%a
or
For /F "tokens=2,3" %a in ( 'FIND /i "L3= " ^< C:\zzsticker.txt' ) do set L3=%a
Whats wrong ?
Attachments:
zzsticker.txt
(87 bytes)
(File Type Details)
file with the info to look for
Answer : cmd FOR /f tokens 2* doesn't work
Sorry, typo when copying and pasting.
That should have been
For /F "tokens=1*" %a in ( 'FIND /i "L3= " C:\zzsticker.txt' ) do set L3=%b
Random Solutions
How Can I Trace Email Routing Failure?
How do I allow only a certain ip adress to access my website?
Windows 2003 DC, want to install DNS but setup fails on missing file(s). (dnsperf.h)
Installing SSL certifcate on exchange 2010
Unable to access OWA
LINUX -- PHP + Sendmail Woes -- Emails not being sent.
Powerpoint 2003 chart labels alignment
Save Publishign site as template in SharePoint 2010
Backup jobs in Symantec Backup Exec 11d keep failing (due to lack of free space on destination drive, I believe). How can I fix this? The job logs have been attached
iSCSI Performance Tuning