[guest@localhost t]$ ls
[guest@localhost t]$ touch cat
[guest@localhost t]$ echo hello >file.txt
[guest@localhost t]$ ll
итого 4
-rw-rw-r--. 1 guest guest 0 дек 30 11:32 cat
-rw-rw-r--. 1 guest guest 6 дек 30 11:32 file.txt
[guest@localhost t]$ *
hello
[guest@localhost t]$
text=`cat file.conf`
val1=`echo "$text" | select_value 1`
val2=`echo "$text" | select_value 2`
[guest@localhost ~]$ find /tmp -maxdepth 1 -type f -printf "%TY %p\n" | awk '$1 >= 2014{print "rm -f " $2}'
rm -f /tmp/.ktorrent_kde4_1000.lock
rm -f /tmp/.XauthFnlUja
rm -f /tmp/winstone152624632382939548.jar
rm -f /tmp/akuma8236603350544705032jar
rm -f /tmp/jna3326402736412458495jar
rm -f /tmp/.X0-lock
[guest@localhost ~]$
[guest@localhost ~]$ a=1
[guest@localhost ~]$ b=2
[guest@localhost ~]$ c=3
[guest@localhost ~]$
[guest@localhost ~]$ [ $((a + b)) -eq $c ]
[guest@localhost ~]$ echo $?
0
[guest@localhost ~]$ [ $((a + b)) -lt $c ]
[guest@localhost ~]$ echo $?
1
[guest@localhost ~]$ [ $((a + b - 1)) -lt $c ]
[guest@localhost ~]$ echo $?
0
[guest@localhost ~]$ [ $((a + b)) -gt $c ]
[guest@localhost ~]$ echo $?
1
[guest@localhost ~]$ [ $((a + b + 1)) -gt $c ]
[guest@localhost ~]$ echo $?
0
[guest@localhost ~]$
Форматы совершенно разные, от pdf и djvu до fb2, т.е. естественно будет база данных с описанием и т.п.
man stat.h
The following symbolic names for the values of type mode_t shall also
be defined.
File type:
S_IFMT Type of file.
S_IFBLK
Block special.
S_IFCHR
Character special.
S_IFIFO
FIFO special.
S_IFREG
Regular.
S_IFDIR
Directory.
...
The following macros shall be provided to test whether a file is of the
specified type. The value m supplied to the macros is the value of
st_mode from a stat structure. The macro shall evaluate to a non-zero
value if the test is true; 0 if the test is false.
S_ISBLK(m)
Test for a block special file.
S_ISCHR(m)
Test for a character special file.
S_ISDIR(m)
Test for a directory.
S_ISFIFO(m)
Test for a pipe or FIFO special file.
S_ISREG(m)
Test for a regular file.
S_ISLNK(m)
Test for a symbolic link.
S_ISSOCK(m)
Test for a socket.
[guest@localhost tmp]$ cat "file.html" | sed 's/"http/\n&/g' | sed -n 's/^"\(http[^"]*\)".*/\1/p'
http://tasteofcountry.com
https://s3.amazonaws.com/tsm-images/logos/footer/204-light.png?id=78
http://tasteofcountry.com/shocking-country-music-splits/
http://tasteofcountry.com/reba-mcentire-narvel-blackstock-relationship-timeline/
http://screencrush.com/official-batman-vs-superman-plot-synopsis/?footer
http://wac.450f.edgecastcdn.net/80450F/screencrush.com/files/2015/07/batman-vs-superman-300.jpg?w=180&h=120&zc=1&s=0&a=t&q=89
http://popcrush.com/stars-who-were-born-rich/?footer
http://wac.450f.edgecastcdn.net/80450F/popcrush.com/files/2015/04/born-rich-300.jpg?w=180&h=120&zc=1&s=0&a=t&q=89
http://diffuser.fm/offensive-band-names/?footer
http://wac.450f.edgecastcdn.net/80450F/diffuser.fm/files/2015/03/offensive-band-names.jpg?w=180&h=120&zc=1&s=0&a=t&q=89
http://comicsalliance.com/comic-book-movie-behind-the-scenes-pictures/?footer
http://wac.450f.edgecastcdn.net/80450F/comicsalliance.com/files/2015/05/behind-the-scenes-300.jpg?w=180&h=120&zc=1&s=0&a=t&q=89
http://tasteofcountry.com/you-think-you-know-country-taylor-swift/?footer
http://wac.450f.edgecastcdn.net/80450F/tasteofcountry.com/files/2014/08/taylor-swift-sexy.jpg?w=180&h=120&zc=1&s=0&a=t&q=89
[guest@localhost tmp]$
StrictModes
Specifies whether sshd(8) should check file modes and ownership
of the user's files and home directory before accepting login.
This is normally desirable because novices sometimes accidentally
leave their directory or files world-writable. The default is
“yes”. Note that this does not apply to ChrootDirectory, whose
permissions and ownership are checked unconditionally.