Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

PDL in abinitio

There is command like this on the graph’s parameter. I could not figure it out. It prints nothing.In abinitio help page, I could not find what -f means as well, thats why I am here.Could you please help me to understand it

$([ -f $FILE_PATH/$SUBJECT_AREA_X/`echo "$FILE_PATTERN_X" | awk -v RUNDATE=$RUN_DATE -F'_' '{for(i=1; i<=NF-1;i++) { printf "%s%s",$i, FS} { printf "%s%s\n", RUNDATE, substr($NF,length(RUNDATE)+1,length($NF)) }}'` ]

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

([ -f ... ]): This is a conditional expression that checks if a file exists. The -f flag is used to test whether the given path corresponds to a regular file.

$FILE_PATH/$SUBJECT_AREA_X/...: This part of the command is constructing the path to the file. It seems to involve variables like $FILE_PATH and $SUBJECT_AREA_X to define the directory structure.

echo "$FILE_PATTERN_X" | awk -v RUNDATE=$RUN_DATE -F'_' '...awk command...': This part uses the awk command to process the contents of $FILE_PATTERN_X. It splits the input on underscores (-F’_’), and then it reconstructs the filename by appending the $RUN_DATE variable to the second-to-last field (excluding the last field, assumed to be a date-related part).

The entire awk command is encapsulated in backticks (“), which means the output of this awk command is substituted into the overall command.

The resulting constructed file path and name are used as an argument to the -f test in the [ ] conditional expression.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading