LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices


Old

new commands that create needed directories

Posted 03-16-2021 at 12:25 AM by Skaperen

i made 2 new commands (with 2 subcommands each) that i will be alpha testing. the 2 commands are named dst and par. the 2 subcommands on each are the same ... ln and mv. there is a --help option, a --version option and a --verbose option. the --help and --version options cause the command to quit after it outputs its information. the --verbose option causes status information to be output.

dst mv moves a file from one path to another, creating all the needed parent directories...
Senior Member
Posted in Uncategorized
Views 638 Comments 1 Skaperen is offline
Old

Background shell sessions

Posted 03-13-2021 at 11:23 PM by Skaperen
Updated 03-15-2021 at 11:59 PM by Skaperen

welcome to Pi day 3-14! edit: Pi day is over.

i now run lots of background shell sessions. this is implement using the screen program. i have a few wrapper scripts to make it easier to use (than the plain screen command) at the command line level.

bgn creates a new background session. argument 1 is the session name. additional arguments are optional and are the first command. you can also set the virtual screen width and height (default 80x25, maximum 1023x1023)...
Senior Member
Posted in Uncategorized
Views 472 Comments 0 Skaperen is offline
Old

Python as an alternative to C

Posted 03-11-2021 at 05:35 PM by Skaperen

Python is considered a "higher level language" than C (or even C++ and C#). it does have the means to "reach down low" to most kernel syscalls and can work directly with file descriptors. its high level features allow doing human interfacing a lot easier such as making the handling of Unicode as easy as strings while still being able to work with bytes in raw form.

in my several years of coding in Python, i have done mostly system level and network level projects...
Senior Member
Posted in Uncategorized
Views 567 Comments 0 Skaperen is offline
Old

A feature i would like to add to head and tail

Posted 03-10-2021 at 08:39 PM by Skaperen

i would like to add a -m option to both the head and tail commands. it would be a regex match where head will output until it has a line that matches and tail will output from after the last line that matches, to the EOF. an option -M can be an inclusive variant that also outputs the matched line in the proper order. another option might be picked to do non-regex matching.
Senior Member
Posted in Uncategorized
Views 399 Comments 1 Skaperen is offline
Old

A feature i have never liked

Posted 03-09-2021 at 06:07 AM by Skaperen

there is a feature in Linux i have never liked. it's in other Unix/POSIX system's, too, so it's not Linux specific. as far as i recall, it predated Linux. the feature in the "mv" command. if you name a directory as the target of a move, it puts the file (or whatever is being moved) inside that directory. if the target is not a directory, obviously it can't, and that's not my issue with the "mv" command. if there is nothing at the target name, "mv" just move the...
Senior Member
Posted in Uncategorized
Views 354 Comments 2 Skaperen is offline

  



All times are GMT -5. The time now is 03:27 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration