[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

Save me time

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 18
Thread images: 1

File: high-level-programming.png (47KB, 864x542px) Image search: [Google]
high-level-programming.png
47KB, 864x542px
ITT: post daily-task automation scripts or ideas for automation scripts.
>>
>>55448761
alias update='sudo pacman -Syyu && pacaur -u'


extract() {
if [ -f $1 ] ; then
case $1 in
*.tar.bz2) tar xvjpf $1 ;;
*.tar.gz) tar xzf $1 ;;
*.bz2) bunzip2 $1 ;;
*.rar) unrar e $1 ;;
*.gz) gunzip $1 ;;
*.tar) tar xf $1 ;;
*.tbz2) tar xjf $1 ;;
*.tgz) tar xzf $1 ;;
*.zip) unzip $1 ;;
*.Z) uncompress $1 ;;
*.7z) 7z x $1 ;;
*) echo "'$1' is not an archive covered by this function"
esac
else
echo "'$1' is not a valid file"
fi
}


Some ones I use
>>
>>55449111
Noice
>>
>>55449111
Damn, the second one is pretty good
>>
>>55449111
Why not just pacaur -Syu?
>>
>>55449403
Thanks for pointing that out
>>
tinkering in Google Apps Script
>>
ls that shows octal permissions (for sunos)

clear;(pwd;ls -lrteh | nawk '{k=0;for(i=0;i<=8;i++)k+=((substr($1,i+2,1)~/[rwx]/) *2^(8-i));if(k)printf("%0o ",k);print}')|less -FR
>>
>>55449111
Please use atool instead of this extract shit.
>>
>>55449111
~/.interjection
-----------------
I'd just like to interject for moment. What you're refering to as Linux, is in fact, GNU/Linux, or as I've recently taken to calling it, GNU plus Linux. Linux is not an operating system unto itself, but rather another free component of a fully functioning GNU system made useful by the GNU corelibs, shell utilities and vital system components comprising a full OS as defined by POSIX.

Many computer users run a modified version of the GNU system every day, without realizing it. Through a peculiar turn of events, the version of GNU which is widely used today is often called Linux, and many of its users are not aware that it is basically the GNU system, developed by the GNU Project.

There really is a Linux, and these people are using it, but it is just a part of the system they use. Linux is the kernel: the program in the system that allocates the machine's resources to the other programs that you run. The kernel is an essential part of an operating system, but useless by itself; it can only function in the context of a complete operating system. Linux is normally used in combination with the GNU operating system: the whole system is basically GNU with Linux added, or GNU/Linux. All the so-called Linux distributions are really distributions of GNU/Linux!

And then
~/.bashrc
-------------
alias linux="cat ~/.interject | xclip -selection c
>>
>>55450663
same shit for leenoocs

clear;(pwd;ls -lrth | awk '{k=0;for(i=0;i<=8;i++)k+=((substr($1,i+2,1)~/[rwx]/) *2^(8-i));if(k)printf("%0o ",k);print}')|more
>>
alias ocean='play -n -n --combine merge synth pinknoise band -n 1200 1800 tremolo 50 10 tremolo 0.14 70 tremolo 0.2 50'

optimize() {
for f in "$@"; do
case "$f" in
*gif) gifsicle -bO3 "$f";;
*png) optipng -o 6 -strip all "$f";;
*jpg) jpegoptim --strip-all "$f";;
*) printf "Error: Something happened.\n"
return 1
esac
done
}
>>
alias pacman = 'yaourt'
alias update = 'pacman -Syyua'
>>
>>55448761
>entire thread is linux shit

well this is useless
>>
>>55452595
what the fuck else could OP mean?
>>
>>55452616
i use hundreds of automation scripts on windows.

@echo off

setlocal enabledelayedexpansion

set groupsize=2000
set n=1
set nf=0

for %%f in (*.*) do (
if !n!==1 (
set /a nf+=1
md 00!nf!
)

move /Y "%%f" 00!nf!

if !n!==!groupsize! (
set n=1
) else (
set /A n+=1
)
)
endlocal
>>
>>55452687
@echo off

cd /d %~dp1

set /p f= Folder Name?
mkdir "%f%"
set newpath="%f%"

:loop
if {%1}=={} goto :EOF
move %1 %newpath%
shift
goto loop

echo on
>>
>>55452720
@echo off
setlocal EnableDelayedExpansion

for /r %%x in (*.*) do (
move "%%x" "%%x"/../..
)

for /f %%i in ('dir /b "%cd%\*.*"') do (
for /d %%d in (*) do rd "%%~d"
)
Thread posts: 18
Thread images: 1


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.