Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: RudiC
Forum: Red Hat 05-05-2017
4,915
Posted By RudiC
You can't use it like that: for (( "$D"=16;...
You can't use it like that: for (( "$D"=16; "$D"<=20; "$D"++ ));. Use unexpanded variable names like for (( i=1; i<5; i++ )); do echo $i; done. $D is already expanded by the shell.
Forum: Red Hat 05-05-2017
4,915
Posted By RudiC
The -d option of date takes one single date only,...
The -d option of date takes one single date only, not several separated by a line feed char. How about
D="$(stat -c %z sh* | awk -F"[ -]" '{print $3}')"
echo "$D"
03
03
Showing results 1 to 2 of 2

 

Featured Tech Videos

All times are GMT -4. The time now is 08:10 PM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy