Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

shell-script

Make a shell script execute commands in telnet or programs

August 6, 2022 by Magenaut

I would like to make a shell script that executes commands on a device that I telnet to or in programs such as FTP or OpenSSL. I have already found a method in FTP, which would look something like this:

Categories Q&A, Unix & Linux Tags shell, shell-script, telnet Leave a comment

Avoiding busy waiting in bash, without the sleep command

August 6, 2022 by Magenaut

I know I can wait on a condition to become true in bash by doing:

Categories Q&A, Unix & Linux Tags bash, shell-script, sleep Leave a comment

How can I assign an initial/default password to a user in Linux?

August 6, 2022 by Magenaut

I found a guide that explains how to set a user’s password. I’m trying to automate it and send an e-mail to the user like:

Categories Q&A, Unix & Linux Tags administration, linux, shell, shell-script, useradd Leave a comment

spawn – command not found!

August 6, 2022 by Magenaut

I am using Mac OS X 10.9.4, following is my script to copy files from local machine to different host

Categories Q&A, Unix & Linux Tags bash, expect, shell-script Leave a comment

Clone directory tree structure and copy files to the corresponding directories modified after a specific date

August 6, 2022 by Magenaut

I have a folder with more than 30 sub directories and I want to get the list of the files which was modified after a specified date(say sep 8 which is the real case) and to be copied with the same tree structure with only the modified files in that folder

Categories Q&A, Unix & Linux Tags file-copy, files, find, shell-script Leave a comment

Can’t use alias in script, even if I define it just above!

August 6, 2022 by Magenaut

I have a very wierd case… If I run a script with /bin/bash, it can’t recognize aliases that I set even inside the script. And the most strange thing is

Categories Q&A, Unix & Linux Tags alias, bash, shell-script Leave a comment

Pipe/redirect a group of commands

August 6, 2022 by Magenaut

I currently use the following setup to redirect the output of multiple commands:

Categories Q&A, Unix & Linux Tags bash, io-redirection, shell-script Leave a comment

Use case / practical example for Bash’ builtin exec

August 6, 2022 by Magenaut

Consider this from the documentation of Bash’ builtin exec:

Categories Q&A, Unix & Linux Tags bash, exec, shell-builtin, shell-script Leave a comment

Shell script to check for the presence of one or more files with a specific extension?

August 6, 2022 by Magenaut

I want to write a script to find a file with specific extension.this much i have done:

Categories Q&A, Unix & Linux Tags bash, files, shell-script, wildcards Leave a comment

Building paths robustly

August 6, 2022 by Magenaut

Say I have several variables in a shell script (e.g. in zsh):

Categories Q&A, Unix & Linux Tags shell-script Leave a comment
Older posts
Newer posts
← Previous Page1 … Page22 Page23 Page24 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress