Skip to content

Magenaut

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

shell

Confusing use of && and || operators

August 11, 2022 by Magenaut

I was skimming through an /etc/rc.d/init.d/sendmail file (I know this is hardly ever used, but I’m studying for an exam), and I’ve become a bit confused about the && and the || operators. I’ve read where they can be used in statements such as:

Categories Q&A, Unix & Linux Tags bash, control-flow, scripting, shell Leave a comment

how can I use bash as my login shell when my sysadmin refuses to let me change it

August 11, 2022 by Magenaut

The unix sysadmin where I’m working is reluctant to give me access to change my login shell from ksh to bash. He has given various excuses, the funniest being that since they write all their scripts for ksh they won’t work if I try to run them. I don’t know where he gets these ideas, but since I can’t convince him, is there any alternative that I have?

Categories Q&A, Unix & Linux Tags login, profile, shell Leave a comment

Using the not equal operator for string comparison

August 11, 2022 by Magenaut

I tried to check if the PHONE_TYPE variable contains one of three valid values.

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

bash shell – ssh remote script capture output and exit code?

August 11, 2022 by Magenaut

I wish to use shell to invoke a script on a remote server.
I would like to capture the output of that script (its logging messages) and the exit code it returns.

Categories Q&A, Unix & Linux Tags bash, remote, shell, ssh Leave a comment

changing current working dir with a script

August 11, 2022 by Magenaut

I’ve read this question and answer, but it doesn’t quit fit my problem, even tho it’s similar.

Categories Q&A, Unix & Linux Tags cd-command, shell Leave a comment

What is word splitting? Why is it important in shell programming?

August 11, 2022 by Magenaut

I’m getting confused about the role word splitting plays in zsh. I have not been exposed to this concept when programming in C, Python or MATLAB, and this has triggered my interest of why word splitting seems to be something specific to shell programming.

Categories Q&A, Unix & Linux Tags shell, zsh Leave a comment

What does dash “-” at the end of a command mean?

August 11, 2022 by Magenaut

Given the following command:

Categories Q&A, Unix & Linux Tags filenames, shell Leave a comment

Command line tool to “cat” pairwise expansion of all rows in a file

August 11, 2022 by Magenaut

Suppose I have a file (call it sample.txt) that looks like this:

Categories Q&A, Unix & Linux Tags awk, shell, shell-script, text-processing Leave a comment

How do ssh remote command line arguments get parsed

August 11, 2022 by Magenaut

I’ve seen the questions and answers about needing to double-escape the arguments to remote ssh commands. My question is: Exactly where and when does the second parsing get done?

Categories Q&A, Unix & Linux Tags bash, process, quoting, shell, ssh Leave a comment

Tool in UNIX to subtract dates

August 11, 2022 by Magenaut

Is there any tool in Solaris UNIX (so no GNU tool available) to subtract dates? I know that in Linux we have gawk that can subtract one date from another. But in Solaris the maximum we have is nawk (improved awk) which cannot perform date calculations. Also I cannot use perl.

Categories Q&A, Unix & Linux Tags awk, date, shell, solaris, utilities Leave a comment
Older posts
Newer posts
← Previous Page1 … Page6 Page7 Page8 … Page46 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