Skip to content

Instantly share code, notes, and snippets.

View staroselskii's full-sized avatar

Georgii Staroselskii staroselskii

  • Saint-Petersburg
View GitHub Profile
#include <iostream>
#include <algorithm>
#include <vector>
int main() {
unsigned int entryCount;
cin >> entryCount;
if (entryCount == 0)
#include <iostream>
#include <algorithm>
#include <vector>
int main() {
unsigned int entryCount;
cin >> entryCount;
if (entryCount == 0)
BIN=lab4
CC=gcc
OBJ=lab4.o
all: $(BIN)
$(BIN): $(OBJ)
%.o: %.c
#!/usr/bin/ksh
if [ ! $# -eq 1 ]
then
echo "Wrong input"
exit 1
fi
USER="$1"
#!/usr/bin/ksh
IFS="`printf ''`"
USAGE="usage: symlink.sh <file>"
get_metadata() {
perl -se 'use File::stat; $file=lstat($filename); if (defined $file) { print $file->ctime . " " . $file->ino . "\n"; } ' -- -filename="$1"
}
readlink() {
perl -se 'use File::Spec; print File::Spec->rel2abs( readlink($file) )' -- -file="$1"
}
#!/bin/ksh
LOGFILE=script.log
function process_input {
local ret=$1
if [[ "$ret" == "~"* ]]; then
echo 1>&2 "Введите 'y' если под ~ подразумевается $HOME"
read confirm
fi