Search Results

Search: Posts Made By: acidoangel
1,307
Posted By Shahul
This will help you... nawk -F':' -v...
This will help you...


nawk -F':' -v v1="11:30:00" -v v2="11:40:00" 'OFS=":"{v=$1":"$2":"$3}{if(v>v1 && v<v2)print}' inputfile
11:32:36:124.id_0000.1:"blalba"
11:33:49:124.id_0000.1:"blalba"...
1,307
Posted By Skrynesaver
Or for something more re-usable (DATA section for...
Or for something more re-usable (DATA section for illustration, you'd have to open the file for reading in a programmed script.

#!/usr/bin/perl

@divs=qw(hour min sec milis);
@start{@divs} =...
1,524
Posted By kumaran_5555
$ awk -F\:...
$ awk -F\: '{key=substr($0,0,20);gsub(/\"/,"");arr[key]=arr[key]$NF;} END{for (k in arr) printf "%s:\"%s\"\n", k,arr[k]}' file.txt
10:04:56:201:id_0002:"RaZ."
10:02:23:125:id_0001:"A entry was...
1,524
Posted By Shell_Life
See if this works for you: #!/usr/bin/ksh ...
See if this works for you:
#!/usr/bin/ksh
while read mLine; do
mTag=$(echo ${mLine} | cut -d':' -f5)
if [[ "${mTag}" = "id_0000" ]]; then
echo ${mLine}
mFirst="Y"
else
if [[...
1,524
Posted By vipinable
Try out this code... origfile.txt= The actual...
Try out this code...
origfile.txt= The actual log file
newfile.txt = formatted log file created by script.

cat origfile.txt|cut -c 1-20|while read line
do
log=`grep -i "${line}"...
Showing results 1 to 5 of 5

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