shell

How do I find the number of files in a subdirectory (folders count as a file) starting with a capital letter in shell Unix?

You need to count the number of files in the subdirectory that begin with a capital letter. How do I do this using the standard Unix shell filters?

Linux. Shell. Sh. Copying files

Hello, gentlemen. I would like to get some advice or help. The task is as follows-the user enters the script name, let's sa ... example, for example, for this task. Look at the overall design style and generally accepted solutions. Thank you in advance.

Connect to remote mysql in Ubuntu terminal

Error when connecting to a remote mysql database. I am trying to connect to Ubuntu via the console utility "mysql". In the fu ... meta_desc','meta_keys','0','0','0','0','1','6','1','','0','pagetitle','','com_content_read.tpl'); EOF The answer is the same

How to run sh scripts correctly?

When running hadoop sh scripts, I am constantly asked for the root password (I did not perform any manipulations with the r ... t turns out that I can run the sh script as sh <scriptName>, or I can just <scriptName>. What's the difference?

Exit EFI Shell mode to start windows

There is a tablet Onda on Androide, with Windows, Windows does not boot, efi shell version 2.31 appears and it does not work out and Windows 10 does not boot, how to exit, do I need a bootloader with Windows on a flash drive for this?

Add a route to the routing table

How can I add a new route (default or to a specific subnet) and change it?

awk checking a field for text

You need to check whether the string field is a text or a number. I have visited this: if ($2 != /[0-9]/){...}else{...}, but this construction does not work correctly and only the else block works. I'm just getting to know awk, so don't scold me.

Compound variable name of the bash variable

Hello, colleagues. There is a script. Part of it: NODE1IPV4=192.168.0.1 NODE2IPV4=192.168.0.2 NODENUM=1 How do I insert $N ... ENUM into the variable name with ip? i.e. get something like [root@host]#echo "$NODE{$NODENUM}IPV4" [root@host]#192.168.0.1

What is smoke test and what is it eaten with?

What is a smoke test? Google gave only a brief formulation, but I would like to have specific examples, literature, etc. How ... r-version ), and after checking the performance of such a manpage, we can say that this utility passed the smoke test or not.

How do I use line break on the left side of sed?

I track logs via tailf (tail -f). For ease of display, I would like to add an empty line after each line. For example: $ t ... sts and do not have the ability to individually configure .bashrc. Actually, the question is: what should be in place magic?

How do I get the full file name in one command?

How do I get the full (with path relative to /) file name in one command? Sometimes you work in the console, and you need to ... have to call pwd to copy the path to the current folder, and ls to copy the file name. Is it possible to do this in one team?

Command queue in the Linux console

Let's assume that a command is already running in the console. It takes a long time. I would like to execute one or more comm ... d bg, but it's not quite the same. It is not necessary to send the command to the background, but to wait for its completion.

Error when mounting a remote fs: "mount: wrong fs type, bad option"

Trying to mount a remote file system: sudo mount -t cifs "//some.url/path" '~/local.path' -o username=$(whoami),rw,ioc ... cifs) you might need a /sbin/mount. helper program) In some cases useful info is found in syslog - try dmesg | tail or so.

Bash script. MV command and read path from console

The user enters the file name and the path to move the file from the console: #!/bin/bash echo "Input name of file"; read fi ... lem is that $path takes as a string. That is, mv works as a rename, not as a move. How can I convert $path to a directory?

What is the ` character used for (backquote, backquote, backtick)?

What are the symbols used for?`? For example: python3.4 `which ptpython`

The cd command in the shell script

I wrote the following command in the script gotodir3.sh : cd dir1/dir2/dir3 And put it in the root of the user's working f ... ated. Set the access rights rwxrwxrwx. I run the script ./gotodir3.sh and stay in the root of the user's working folder! Why?

Checking your Internet connection

I read that you can check the Internet connection using android.permission.ACCESS_NETWORK_STATE Or android.net.ConnectivityManager But all this is only using java. Is it possible to implement this with a Shell?

OpenServer and 'not support shell-commands'?

The site is on MODx Revo, hosted on the OpenServer locale. I put the plugin on the site and when the plugin is executed, the ... I moved the site to the classic virtual hosting-the error disappeared. Please tell me how to fix this error on OpenServer?

WScript. Shell encoding in UTF-8-VBS

I am writing a script for creating a shortcut on VBS and I ran into the problem of coding Set sh = CreateObject("WScript.She ... ccurs. How do I solve the encoding problem in the script above? I've already covered the entire length and breadth of Google.

What are [] in bash for?

I'm starting in shell script now, and often, reading other people's programs, I see the use of [] associated with if. For exa ... hese characters... I wanted to understand exactly how this works and when I should use it in my scripts. Can anyone explain?