Форматы совершенно разные, от 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.
Для меня проблема заключается в том, что я не знаю - правильно ли так вообще делать?
до этой строчки node указывает на голову
открыть_ёжика_левого
открыть_ёжика_правого
for ticket in tickets:
for i in tickets:
[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]$
Как указать правильно промежуток,чтобы не перечислять числа от 1 до 100.
>>> d = {'some_value1': 112, 'some_value2': 321, 'dam': 42, 'pam': 43}
>>> out = {k: d[k] for k in d if k in ('dam', 'pam')}
>>> out
{'dam': 42, 'pam': 43}
>>>
существует ли что-то вроде этого для Си?
[guest@localhost ~]$ text="word1@line1\nword2@line2\nword3@line3\nword2@line4"
[guest@localhost ~]$ v="word2"
[guest@localhost ~]$
[guest@localhost ~]$ echo -e "$text"
word1@line1
word2@line2
word3@line3
word2@line4
[guest@localhost ~]$ echo -e "$text" | sed -n '/^'$v'@/ s/^.*@//p'
line2
line4
[guest@localhost ~]$
// if(C < A) { C = A + C; A = C - A; C = C - A; }