Debian Codegraph @

symlinks2.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2 # symlinks.sh: Lists symbolic links in a directory.
3
4 OUTFILE=symlinks.list # save-file
5
6 directory=${1-`pwdscip-shell system . . pwd.`}
7 # Defaults to current working directory,
8 #+ if not otherwise specified.
9
10
11 echoscip-shell system . . echo. "symbolic links in directory \"$directory\"" > "$OUTFILE"
12 echoscip-shell system . . echo. "---------------------------" >> "$OUTFILE"
13
14 for file in "$( findscip-shell system . . find. $directory -type l )" # -type l = symbolic links
15 do
16 echoscip-shell system . . echo. "$file"
17 done | sortscip-shell system . . sort. >> "$OUTFILE" # stdout of loop
18 # ^^^^^^^^^^^^^ redirected to save file.
19
20 # echo "Output file = $OUTFILE"
21
22 exit $?