- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmakeQScript
More file actions
Latest commit
executable file
·32 lines (30 loc) · 631 Bytes
/
Copy pathmakeQScript
File metadata and controls
executable file
·32 lines (30 loc) · 631 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
filename=$1
scriptName=$filename.QScript
if [ -s$filename ]
then
(
echo"#!/bin/bash"
cat $HOME/shell.scripts/YNQ.func
whileread line
do
echo"echo"
echo"echo '=============================='"
lineNoQuotes=$(echo "$line"|
sed -e "s,','\\'',g")
escLine=$(echo "$line"|
sed \
-e 's,",\\",g' \
-e "s,','\\'',g" \
-e 's,\$(,\\$(,'
)
echo"echo \"Command:\" '$lineNoQuotes'"
echo"YNQ 'Execute' \"$escLine\""
done
) >$scriptName<$filename
chmod +x $scriptName
echo Created $scriptName
else
echo$filename does not exist
exit 1
fi