Если сейчас все так просто, то нужно разбираться в make/cmake?
# Build section
CC = gcc
CFLAGS = -ansi -pedantic -Wall
TARGET = ntow
OBJS = main.o noun.o triple.o number.o cmdline.o errors.o input.o
BASEDIR = .
TESTDIR = $(BASEDIR)/tests
# Install section
prefix = /usr/local
PREFIX = $(prefix)
BINDIR = $(PREFIX)/bin
# Rules
all: $(TARGET)
$(TARGET): $(OBJS)
@$(CC) $(CFLAGS) $^ -o $@ && echo "$(TARGET) has built"
main.o: cmdline.h number.h input.h errors.h
triple.o: triple.h
number.o: number.h
cmdline.o: cmdline.h errors.h
# Commands
help:
@echo "usage: make [ test | install | uninstall | clean | cleanall ]" 1>&2
test: $(TARGET)
@$(MAKE) -C $(TESTDIR) run
clean:
@rm -f $(OBJS) $(TARGET) && echo "$(TARGET) cleaned"
cleanall: clean
@$(MAKE) -C $(TESTDIR) clean
install:
install -d $(BINDIR)
install $(TARGET) $(BINDIR)/$(TARGET)
uninstall:
rm -f $(BINDIR)/$(TARGET)
.PHONY: help all test clean cleanall install uninstall
>>> b'\320\237\321\200\320\260\320\262\320\276\320\262\321\213\320\265'.decode('utf-8')
'Правовые'
>>>
C-x (
abc
C-x )
M-5
C-x e
#include <stdio.h>
#include <locale.h>
#include <wchar.h>
int main(void)
{
FILE *fp_in, *fp_out;
wchar_t wch;
setlocale(LC_ALL, "ru_RU.UTF-8");
fp_in = fopen("file.txt", "r");
wch = getwc(fp_in);
fclose(fp_in);
putwc(wch, stdout);
wch++;
putwc(wch, stdout);
putwc(L'\n', stdout);
fp_out = fopen("output.txt", "w");
putwc(wch, fp_out);
fclose(fp_out);
return 0;
}
[guest@localhost wch]$ .ansi wch.c -o wch
[guest@localhost wch]$ ./wch
жз
[guest@localhost wch]$ cat file.txt
ж[guest@localhost wch]$ cat output.txt
з[guest@localhost wch]$
Архив распоковался при помощи менеджера архива и усе , где так сказать местный exe ?
./configure
make
sudo make install
#!/bin/bash
read_lines_pair()
{
echo "$(head -$1 $2 | tail -1) $(head -$1 $3 | tail -1)"
}
convert_line()
{
sed 's/^/wget /; s%[^ ]*$%-O ./img/&.jpg%'
}
process()
{
local len=$(wc -l urls.txt | cut -d' ' -f1)
for i in `seq 1 $len`; do
read_lines_pair $i urls.txt names.txt | convert_line
done
}
process
[guest@localhost makeun]$ ./makeun.sh
wget http://url.ru/some?v=86ff8d97yguifidgijdhfkjghdflkgjdf -O ./img/1321231321321321321.jpg
wget http://url.ru/some?v=879874g65df4g65d4gf65d4f65g4 -O ./img/4564654654564654654.jpg
wget http://url.ru/some?v=d89f7g98df7g987fd98g7d98f7gfd -O ./img/4654654654654654564.jpg
[guest@localhost makeun]$
./makeun.sh | sh
sed -i -s '$a text' *.txt
[guest@localhost t]$ ls
file1.txt file2.txt file3.txt
[guest@localhost t]$
[guest@localhost t]$ cat file1.txt
a
[guest@localhost t]$ cat file2.txt
b
[guest@localhost t]$ cat file3.txt
c
[guest@localhost t]$
[guest@localhost t]$ sed -i -s '$a text' *.txt
[guest@localhost t]$
[guest@localhost t]$ cat file1.txt
a
text
[guest@localhost t]$ cat file2.txt
b
text
[guest@localhost t]$ cat file3.txt
c
text
[guest@localhost t]$
[guest@localhost ~]$ cat /etc/my.cnf.d/charsets.cnf
# My config file for charset
[mysqld]
init_connect='SET collation_connection = utf8_unicode_ci'
character-set-server = utf8
collation-server = utf8_unicode_ci
[client]
default-character-set = utf8
[guest@localhost ~]$
CREATE TABLE tab (a INT, b VARCHAR(255))
CHARACTER SET utf8 COLLATE utf8_unicode_ci;
mysql> create table tab (a int, b text) character set utf8 collate utf8_unicode_ci;
Query OK, 0 rows affected (0.07 sec)
mysql>
mysql> insert into tab values (1, 'абвгд');
Query OK, 1 row affected (0.02 sec)
mysql> select * from tab;
+------+------------+
| a | b |
+------+------------+
| 1 | абвгд |
+------+------------+
1 row in set (0.00 sec)
mysql>
[guest@localhost ~]$ \
> func ()
> {
> read s
> for ((i = 0; i < ${#s}; i++)); do
> c=${s:$i:1}
> case $c in
> "а") oc="a";;
> "б") oc="b";;
> "в") oc="v";;
> "г") oc="g";;
> "и") oc="i";;
> "й") oc="j";;
> "к") oc="k";;
> "л") oc="l";;
> "н") oc="n";;
> "о") oc="o";;
> "с") oc="s";;
> "я") oc="ya";;
> *) oc="$c";;
> esac
> echo -n "$oc"
> done
> echo
> }
[guest@localhost ~]$
[guest@localhost ~]$ echo "яблонский головоног" | func
yablonskij golovonog
[guest@localhost ~]$