SC2002: Useless cat. Consider 'cmd < file | ..' or
'cmd file | ..' instead.
Signed-off-by: Thanh Ha <zxiiro@gmail.com>
Change-Id: Icdbeec332969ce5d8769aea1eb325a7fe35bcc77
fi
# Retrieve the current uptime (in seconds)
-uptime=$(cat /proc/uptime | awk '{print $1}')
+uptime=$(awk '{print $1}' /proc/uptime)
# Convert to integer by truncating fractional part' and round up by one
((uptime=${uptime%\.*}+1))
echo "OpenStack Heat parameters generated"
echo "-----------------------------------"
echo "parameters:" > "$stack_parameters"
-cat "$tmp_params" | sed 's/^/ /' >> "$stack_parameters"
+sed 's/^/ /' >> "$stack_parameters" "$tmp_params"
cat "$stack_parameters"
rm "$tmp_params"
local lfn_umbrella
lfn_umbrella="$(echo "$GERRIT_URL" | awk -F"." '{print $2}')"
- for namequoted in $(cat $release_file | yq '.containers[].name'); do
- versionquoted=$(cat $release_file | yq ".containers[] |select(.name==$namequoted) |.version")
+ for namequoted in $(yq '.containers[].name' $release_file); do
+ versionquoted=$(yq ".containers[] |select(.name==$namequoted) |.version" $release_file)
#Remove extra yaml quotes
name="${namequoted#\"}"