Search Results

Search: Posts Made By: sene_geet
2,128
Posted By rajamadhavan
If for some reason, you need perl only syntax,...
If for some reason, you need perl only syntax, this will do


perl -nle 'print /(.+(?=\<\?xml version="1.0"\?\>))|((?<=\<Status\>).+(?=\<\/Status\>))/g' file_name
1,505
Posted By bakunin
Here is the problem: always keep in mind that the...
Here is the problem: always keep in mind that the shell will do a simple text replacement to replace variables with their contents. This is very versatile on one hand but can lead to unexpected...
37,024
Posted By jaduks
A awk one to remove leading 0's $ echo...
A awk one to remove leading 0's

$ echo "0000000231" | awk '{print $1 + 0}'
231
2,323
Posted By jayan_jay
Based on the input given .. Try with this .. ...
Based on the input given .. Try with this ..

$ nawk '/CREATED|COMPLETED/{split($1,a,">"); print a[2]}' infile
2010-03-25-09.51.52.484529
2010-03-25-09.51.53.171452
2010-03-25-09.51.52.484529...
29,485
Posted By mercy
time_start=`date +%s` script body ...
time_start=`date +%s`

script body

time_end=`date +%s`
time_exec=`expr $(( $time_end - $time_start ))`

echo "Execution time is $time_exec seconds"
Showing results 1 to 5 of 5

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