search for: num_lin

Displaying 4 results from an estimated 4 matches for "num_lin".

Did you mean: num_in
2012 Jun 06
3
extracting values from txt file that follow user-supplied quote
...DISCREPANCY =" One approach I took was the following: library(R.utils) txt_con<-file(description="D:/MCR_BeoPEST - Copy/MCR.out",open="r") #The above will need to be altered if one desires to test code on the attached txt file, which will run much quicker system.time(num_lines<-countLines("D:/MCR_BeoPEST - Copy/MCR.out")) #elapsed time on full 1Gb file took about 55 seconds on a 3.6Gh Xeon num_lines #14405247 system.time( for(i in 1:num_lines){ txt_line<-readLines(txt_con,n=1) if (length(grep(" PERCENT DISCREPANCY =",txt_line))) {...
2025 Jan 10
2
[PATCH v2] ssh-add: support external parsing of key listing
...trace "agent forwarding" -${SSH} -A -F $OBJ/ssh_proxy somehost ${SSHADD} -l > /dev/null 2>&1 +AGENT_LISTING=$(${SSH} -A -F $OBJ/ssh_proxy somehost ${SSHADD} -l 2> /dev/null) r=$? if [ $r -ne 0 ]; then fail "ssh-add -l via agent fwd failed (exit code $r)" fi +NUM_LINES=$(printf "%s" "$AGENT_LISTING" | wc -l) +if [ "$NUM_LINES" -eq 0 ]; then + fail "ssh-add -l via agent fwd has no keys" +fi ${SSH} "-oForwardAgent=$SSH_AUTH_SOCK" -F $OBJ/ssh_proxy somehost ${SSHADD} -l > /dev/null 2>&1 r=$? if [ $r -n...
2025 Jan 10
1
[PATCH v2] ssh-add: support external parsing of key listing
...o done trace "agent forwarding" -${SSH} -A -F $OBJ/ssh_proxy somehost ${SSHADD} -l > /dev/null 2>&1 +AGENT_LISTING=$(${SSH} -A -F $OBJ/ssh_proxy somehost ${SSHADD} -l 2> /dev/null) r=$? if [ $r -ne 0 ]; then fail "ssh-add -l via agent fwd failed (exit code $r)" fi +NUM_LINES=$(printf "%s" "$AGENT_LISTING" | wc -l) +if [ "$NUM_LINES" -eq 0 ]; then + fail "ssh-add -l via agent fwd has no keys" +fi ${SSH} "-oForwardAgent=$SSH_AUTH_SOCK" -F $OBJ/ssh_proxy somehost ${SSHADD} -l > /dev/null 2>&1 r=$? if [ $r -ne 0...
2025 Jan 09
2
[PATCH] ssh-add: support parser-friendly operation
From: Corey Hickey <chickey at tagged.com> When ssh-add is used in a script like: if ! KEY_LISTING=$(ssh-add -l 2>&1) ; then echo "SSH agent error" >&2 exit 2 fi ...the operation fails when there is an agent but there are no keys in the agent. This is because ssh-add exits with status of 1. If the intent is to examine the keys in the agent,