Search Results

Search: Posts Made By: bora99
8,634
Posted By itkamaraj
how 15 is today's date? 20140715 <= today's...
how 15 is today's date?

20140715 <= today's date

today=$(date +%Y%m%d)
grep -v "${today}" filename
168,790
Posted By Perderabo
Days Elapsed Between 2 Dates
We really don't (yet) have a posting that addresses the general problem of number of days between two dates. So I have just finished what should be the last date calculation script that I ever...
1,272
Posted By Smiling Dragon
Try this: rsync -ravz -e ssh */00...
Try this:
rsync -ravz -e ssh */00 remote_host:/tmp
5,189
Posted By Scrutinizer
O by the way, the matching syntax use in a case...
O by the way, the matching syntax use in a case statement is Unix Pattern matching, not ERE .
5,189
Posted By Scrutinizer
Might need to flip value2 and value2:[0-9][0-9]...
Might need to flip value2 and value2:[0-9][0-9] around

case $var in
value1) echo value1 ;;
value2:[0-9][0-9]*) echo "part1=${var%%:*} part2=${var#*:}" ;;
value2) ...
5,189
Posted By Chubler_XL
Try this: case "$var" in value1) echo...
Try this:

case "$var" in
value1) echo value1 ;;
value2) echo value2 ;;
*:[0-9][0-9]*) echo part1=${var%:*} part2=${var#*:} ;;
*) echo "Unknown format" >&2 ;;
esac
5,429
Posted By balajesuri
If you still insist on perl, here's one. $ cat...
If you still insist on perl, here's one.
$ cat inputfile
;;search_value#field1#field2#junk#junk#junk#junk
$ perl -F"#" -lane '$e=shift @F;if($e=~ /^\S+'$search_string'/){print "@F"}' inputfile...
5,429
Posted By Corona688
Improve your awk script, I'd say... Surely it's...
Improve your awk script, I'd say... Surely it's possible to make it portable, if it isn't already. The only thing I see which might not be completely portable is the -v. In what way does it not...
5,429
Posted By jim mcnamara
Ok, but be aware: perl is NOT POSIX so it is not...
Ok, but be aware: perl is NOT POSIX so it is not guaranteed to be on a given unix box.

Next, there are different awk versions on some machines - KSH by itself does not enforce a particular version...
Showing results 1 to 9 of 9

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