UNIX батник
текстовым редактором
отлично, а какое требование к имени файла?
в досе помнится шаблон *.bat
в досе помнится шаблон *.bat
Никакого. Есть требование на права (файл должен быть исполняемым).
пример файл hello.111:
Права:
Первая строка в файле указывает, какой интерпретатор читает и выполняет твои команды. В данном случае, это bash, находящийся в каталоге /usr/bin
пример файл hello.111:
#!/bin/bash
echo "Hello, this is a batch :)"
Права:
chmod u+x hello.111
Первая строка в файле указывает, какой интерпретатор читает и выполняет твои команды. В данном случае, это bash, находящийся в каталоге /usr/bin
никакого
он даже может не быть исполняемым, если запускать так:
sh filename
он даже может не быть исполняемым, если запускать так:
sh filename
зачем тебе юникс?
предварительно выставить атрибут +x
./file.sh
./file.sh
заметь, он не спросил, какой линукс ставить 

я тоже уже два года не спрашиваю:)
не песдеть! UNIX офигенная система для ПК.
а за советы спасибо.
а за советы спасибо.
не песдеть! UNIX офигенная система для ПК.да правильно, настоящие не_ламаки сидят на ней.
а за советы спасибо.

man 2 execve
---
"Аллах не ведёт людей неверных."
---
"Аллах не ведёт людей неверных."
> я тоже уже два года не спрашиваю:)
Но всё время жалуешься, что не можешь выбрать.
Но всё время жалуешься, что не можешь выбрать.
и причём здесь execve (const char *filename, char *const argv[], char *const envp[]); ?
Читать надо дальше SYNPOSIS
---
"Аллах не ведёт людей неверных."
EXECVE(2) NetBSD System Calls Manual EXECVE(2)
NAME
execve -- execute a file
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <unistd.h>
int
execve(const char *path, char *const argv[], char *const envp[]);
DESCRIPTION
execve transforms the calling process into a new process. The new
process is constructed from an ordinary file, whose name is pointed to by
path, called the new process file. This file is either an executable
object file, or a file of data for an interpreter. An executable object
file consists of an identifying header, followed by pages of data repre-
senting the initial program (text) and initialized data pages. Addi-
tional pages may be specified by the header to be initialized with zero
data; see a.out(5).
An interpreter file begins with a line of the form:
#! interpreter [arg]
When an interpreter file is execved the system runs the specified
interpreter. If the optional arg is specified, it becomes the first
argument to the interpreter, and the name of the originally execved
file becomes the second argument; otherwise, the name of the originally
execved file becomes the first argument. The original arguments are
shifted over to become the subsequent arguments. The zeroth argument,
normally the name of the execved file, is left unchanged. The inter-
preter named by interpreter must not itself be an interpreter file.
---
"Аллах не ведёт людей неверных."
надо бантик в юниксе замутить. как?
и кучка 

я знаю, что делает эта функция. только мне кажется, что здесь разговор не про запуск скрипта из программы на С
Ты так и не прочитал man, там всё сказано яснее некуда:
Тебе по буквам повторить?
---
"Аллах не ведёт людей неверных."
An interpreter file begins with a line of the form:
#! interpreter [arg]
When an interpreter file is execved the system runs the specified
interpreter. If the optional arg is specified, it becomes the first
argument to the interpreter, and the name of the originally execved
file becomes the second argument; otherwise, the name of the originally
execved file becomes the first argument.
Тебе по буквам повторить?
---
"Аллах не ведёт людей неверных."
а, ты про #!
ну дык я уже и забыл, как про это можно не знать
ну дык я уже и забыл, как про это можно не знать

ну дык я уже и забыл, как про это можно не знатьТак это с первого поста было ясно. Тут задача была проще.
Оставить комментарий
GAD_FATAL
надо батник в юниксе замутить. как?