i tried running this script but it didn't work! i typed ./FindSCT.bash visit.bash where is FindSC.bash is the name of my script and visit.bash is the file i want to get my input from. i tried to type chmod 700 FindSCT i also wrote chmod +x FindSCT.bash and also typed PATH="${PATH}:." but non of these things actually helped. also i made sure that the two files are in the same directory! any help would be very appreciated! also i tried to add " " around ($1 also $2).. still command not found if i do ls i get this :(the two scripts are in the same directory :/ FindSCT.bash visit.bash !
<pre> <pre>#!/bin/bash function ssort { echo sort -rnk2 $1 | sort -rsk3 | uniq -2 | cut -d" " -f3 | wc -l } if (( $# == 1 )); then echo -rnk2 $1 | sort -rsk3 | uniq -2 | cut -d" " -f3 fi if (( $# == 2 )); then nn=`ssort $*` if (( ${nn} > $2 )); then echo -rnk2 $1 | sort -rsk3 | uniq -2 | cut -d" " -f3 fi echo -rnk2 $1 | sort -rsk3 | uniq -2 | cut -d" " -f3 | head -n{$2} fi
if (( ${nn} > $2 )); then
cut -d" " -f3
echo -rnk2 visit.basj | sort -rsk3 | uniq -2 | cut -d" " -f3
echo -rnk2 visit.basj | sort -rsk3 | uniq -2
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)