Read a file line by line and extract the 3rd and 6th token of each line read. PLease note that each line read is to be tokensied based onto "/" "\" ":"
Kindly help me with a script?
Read a file line by line and extract the 3rd and 6th token of each line read. PLease note that each line read is to be tokensied based onto "/" "\" ":"
Kindly help me with a script?
Sounds like classroom stuff - what did you try so far?
If it is no classroom stuff, show an input example and the wanted output. Use code tags when doing so, ty.
#!/bin/ksh
while read linevar
do
print $linevar
done < file.xml
But this doesn't help.
not a classroom stuff but need to write batch file doing same stuff for windows and shell script for UNIX OS. In this case, the file.xml need to be tokenised on the basis of tokens which i mentioned earlier.
Can you help?
awk -F '[\\:/]' '{print $3, $6}' inputfile
Sounds like homework to me - please post homework in the homework forums from now on.
Dude,
where is the variable for each line which can be tokenised????
here is one sample of the file to be read
2010/05/12T14:52:50;sdpl;dfasdf;asdatus;Issmation;sasssthe eus.
Oh, just noticed you asked very similar question in your other thread - closing this one.
From the forum rules: