Debian Codegraph @

redir4a.sh

raw symbols SCIP
1 #!/bin/bashscip-shell filesystem . . `/bin/bash`.
2
3 if [scip-shell system . . `[`. -z "$1" ]
4 then
5 Filename=names.data # Default, if no filename specified.
6 else
7 Filename=$1
8 fi
9
10 Savefile=$Filename.new # Filename to save results in.
11 FinalName=Jonah # Name to terminate "read" on.
12
13 line_count=`wcscip-shell system . . wc. $Filename | awkscip-shell system . . awk. '{ print $1 }'` # Number of lines in target file.
14
15
16 for name in `seqscip-shell system . . seq. $line_count`
17 do
18 read name
19 echoscip-shell system . . echo. "$name"
20 if [scip-shell system . . `[`. "$name" = "$FinalName" ]
21 then
22 break
23 fi
24 done < "$Filename" > "$Savefile" # Redirects stdin to file $Filename,
25 # ^^^^^^^^^^^^^^^^^^^^^^^^^^^ and saves it to backup file.
26
27 exit 0