-
Notifications
You must be signed in to change notification settings - Fork 1
find examples
Oliver Gaida edited this page Sep 11, 2020
·
14 revisions
rusdc find nr '[456]%sap' name,z_project --format mlr --mlr_format "csv --ofs ';'"
the optional 'mlr_format' will be attached to --o at the mlr-commandline. So "csv --ofs ';'" will end up with miller-command: mlr --ijson --ocsv --ofs ';'
finds all Server with z_project.name starting with 123456, second search all childs with a name starting with Linux
rusdc find nr "z_project.name like '123456%' and class.type"\
" in ('Server', 'Virtueller Server') and delete_flag.sym = 'active'" \
name --format mlr | tee 123456_server
for ci in $(cat 123456_server | sed '1 d'); do rusdc find hier \
"parent.name = '$ci' and child.name like 'Linux%'" \
parent --format mlr | sed '1 d' | head -1 ; done | tee 123456_server_Linuxbe aware of perls lowercase for a better look
function find_ci(){
rusdc find nr "name like '%"$1"%'" name,description \
--format mlr --mlr_format json | perl -ne 'print(lc($_))' |sort
}function find_cnt(){
name=$1
dom=$2
rusdc find cnt "last_name like '%${name}%' and email_address like '%${dom}%'" \
last_name,first_name,email_address,phone_number,mobile_phone --format mlr
}
## in action:
find_cnt aid sycor
last_name first_name email_address phone_number mobile_phone
Gaida Oliver Oliver.Gaida@sycor.de +49.... +49....rusdc find in \
"assignee.email_address = 'Oliver.Gaida@sycor.de' and status.sym in "\
"('Service pending','Work in progress.','Customer Pending','Open','Hold','Resolved')" \
ref_num,z_project,summary,status,call_back_date,affected_resource,orig_user_organization \
--format mlrfunction show_changeorder_activities(){
rusdc find chgalg "change_id.chg_ref_num = '$1'" \
call_req_id,action_desc,analyst,description,time_stamp,type \
--format mlr --mlr_format xtab
}rusdc find nr "class.type = 'server' and z_chg_mgr_1 is null"\
" and name not like 'xy%'" name,z_chg_mgr_1 --format mlr