Search Results

Search: Posts Made By: bora99
8,658
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
1,301
Posted By Smiling Dragon
Try this: rsync -ravz -e ssh */00...
Try this:
rsync -ravz -e ssh */00 remote_host:/tmp
5,235
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,235
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,235
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,468
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,468
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,468
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...
168,848
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...
Showing results 1 to 9 of 9

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