A shell is software that lets users interact with the operating system, usually by typing at a command-line.

0
votes
0answers
6 views

Equivalent of unix command “type” in command prompt

In Unix or Linux, type <arguement> provides information about how argument would be interpreted if used as a command. Is there any equivalent in command prompt (or in power shell as well). I ...
0
votes
0answers
9 views

How can bash read the background colour of the Putty window it's running in?

I use various background colours to differentiate between the systems to which I log on. It's tiring to type set background=light or set background=dark in my vi sessions, and let's not talk about ...
0
votes
0answers
9 views

unable to start a bind shell with ssl on ncat

Ncat: Version 7.10i tried this with other version as well no luck.this is the cmd i gave to start listener. If I don't start the bind shell then this listener works without any issues and if i don'...
0
votes
2answers
28 views

Bash scripting: run a shell command from inside a script with variable inside quotes

I need to load a db into a mysql server and the following command works from the shell:From shellmysql -h "172.17.0.2" -u "root" "-pmypasswd" -Bse "create database mydb;"But not from the script, ...
0
votes
1answer
19 views

Trying to give “&” as part of adb shell input text

I'm working with the login page in one of the instance I need to pass the password which has "&" in it. It is not letting me send the text which involves "&".Example:adb shell input text ...
0
votes
0answers
16 views

Open tab, set it's title and execute command with Guake

Is there a way to programmatically make Guake to:Open new tabSet's it title to the specified stringExecute a specified command in it?I just can't figure out the correct CLI arguments to use.
0
votes
1answer
54 views

Why is my C++ program opening in text editor after compilation?

I've just compiled a C++ program - which is not a console program, but instead, graphical and using gtkmm.After building with g++, I can launch it by typing http://superuser.com/program from the terminal. However, if ...
2
votes
1answer
24 views

chsh: Operation was denied because the current credentials do not have the appropriate privileges

I am unable to change my default shell in osx high sierra.sudo chsh -s /bin/zsh username chsh: Operation was denied because the current credentials do not have the appropriate privileges. ...
0
votes
1answer
18 views

syntax error near unexpected token `>' in script run by cron

I'm writing a shell script for Mac OS/Linux. The script is run by a cron job. I'm trying to append stdout and stderr to a log file. My command(simplified) looks like this(line 5 in myscript.sh):...
0
votes
0answers
13 views

Add a datetime into a log file - CRON TASK

I would like how can i get a log file : my_Log.log who have this infos :31/07/2017 - 19:05:00 : ok31/07/2017 - 19:10:00 : ok31/07/2017 - 19:15:00 : ko31/07/2017 - 19:20:00 : okI've tryed ...
0
votes
1answer
42 views

Alias' aren't runnable/executable from a shell script? Mac OS X Sierra 13.x

So this screenshot basically explains ithttps://gyazo.com/1a9d621efa28c7994c3a2afbe0411a2bI've got some alias' set up for opening a new tab within terminal, and doing other stuff, even an alias ...
0
votes
2answers
80 views

sh syntax to handle zero files matching a wildcard, as well as more?

I want to write a /bin/sh shell script which will handle any files matching a wildcard. It's easy to handle 1 or more matching files. However, I'm finding it awkward to handle the case of 0 matching ...
3
votes
1answer
44 views

Arg handling in a script for a modified “find” function?

I'm using FreeBSD and I understand and use the -prune option on find to prevent the command descending into a subdirectory. But I find the necessary syntax very clumsy and awkward. It also doesn't ...
0
votes
0answers
16 views

Openvas ' Failed to read response' in bash script

Im a beginner with bash script. I have an OpenVAS bash script that is trying to create a target, retrieve the target ID then create a task and retrieve the task ID. #!/bin/bashTarget_return=$(omp --...
1
vote
1answer
33 views

how to record a terminal session in Windows?

Linux and Unix have the script command, which is quite useful:The script command is a Unix utility that records a terminalsession.1 The scriptreplay command offers a replay function toscript....
0
votes
2answers
60 views

Shebang, interpreter and a script

One can use shebang line to provide the interpreter to use to execute a script:#!/bin/bashecho "Hello world"My question is how can we determine in the script which interpreter is indeed used. The ...
3
votes
1answer
64 views

Putty stops displaying colors when in SU

So as the title suggests my putty stops displaying colors as soon as i enter SU.I dont know if this is how its suppose to work or if there is any work around, already tried googling but only come up ...
0
votes
0answers
31 views

sh: l1.exe: command not found ??? How come?

I am using Gaussian computational chemistry package ES64L-G16RevA.03 on : Linux ubuntu 4.4.0-116-generic #140-Ubuntu SMP Mon Feb 12 21:23:04 UTC 2018 x86_64 x86_64 x86_64 GNU/LinuxAfter installing ...
-1
votes
1answer
54 views

Shell command for opening “Control Panel/Personalization/Start/Choose which folders appear on start” in windows 10? [closed]

Also, if there is some way to see this shell command from Task Manager, Process Explorer, or some other useful utility when that window is open, Please also explain how and what to look at/for so I ...
0
votes
1answer
104 views

Universal method of opening some sort of BASH shell on Linux

I was wondering if there was a universal method of opening a BASH terminal on all (or atleast most) linux distributions, using keyboard shortcuts.This can be accessing the TTY using the f1..12 keys,...
0
votes
1answer
29 views

$(“/usr/sbin/sysctl -n hw.memsize”) No such file or directory

macOS High Sierra, 10.13.3 (17D102)If I run in terminal sysctl -n hw.memsize it works fine, I get a numberIf i run which sysctl i get /usr/sbin/sysctl which seems correctHow to run the same ...
-1
votes
0answers
20 views

Causes of SFTP file integrity issue

What could be the reason that after a file is transferred from a server A (source file) to server B (destination file) via sftp, the source file and destination file size is different?
0
votes
0answers
45 views

Windows 10 IOT single application only in embedded environment

I am creating a tablet computer running Windows 10 IoT Enterprise. I want the system to not start explorer.exe or any Windows GUI at all, and only start a ClickOnce-deployed WinForms application (the ...
1
vote
0answers
62 views

How to delete all hardlinks to the same file (inode)?

I've used Link Shell Extension to create a bunch of hardlinks in different directories within the same hard drive (to save space, as I need both stored in different locations). When I want to delete ...
0
votes
2answers
55 views

unix shell tips to assign boolean value to variable from a test

code to show the request in context (unix ksh currently):r=$( [ -z "foo" ] && echo true || echo false ) is there a better, simplerway to assign r with true or false something like r=$( [ -...
1
vote
1answer
69 views

Find and copy folders recursively but keep the structure

My problem: I've got two folders, i.e., ~/foo and ~/bar. Both have got the same structure like ~/[foo/bar]/subdir1 and ~/[foo/bar]/subdir2 and inside these subdirectories in foo are folders like .svn/...
-2
votes
0answers
14 views

File Globbing in Unix or Linux, [duplicate]

Explain the difference between these two commands.$ find /data -name "*.txt"$ find /data -name *.txt
0
votes
1answer
41 views

Grep to filter log file

How to change a log file that looks like this:Jul 6 17:35:10 sdc-prius motion_planner[1284]: new destination: [55.733510, 37.587401]Jul 6 17:35:11 sdc-prius control[1284]: next waypoint: [55.733668,...
0
votes
0answers
43 views

Is there a way to recover directory from low power disconnected drives?

Let me first describe the issue. I work on a Macbook Air and have a pendrive permanently connected for largish work data. About once a week it happens to me that power gets low - after I connect ...
1
vote
2answers
28 views

Need to skip the HomeDirectory permission check on remote machine for the ssh client .How to set StrictModes off for a specific host in ssh client?

I am trying to connect to a remote machine over ssh in a passwordless manner using ssh-keys .But it is failing to connect without password due to the permission on the remote server home folder (777) ....
0
votes
1answer
40 views

Shell script: Delete files when folder with same name does not exist

I have a set of folders, and a set of *.DAT files.I want to remove a *.DAT file if no folder with the same name (without .DAT) exists.It took me some time to come to this solution:find . -type d &...
0
votes
1answer
92 views

Issue with sourcing ~/.inputrc, and binding Control-delete to a command

To source my ~/.inputrc, I've tried C-x C-c and bind -f ~/.inputrc. I'm out of ideas, even after reading the man bash section on bind.I have "\C-Rubout": backward-kill-word in my ~/.inputrc. But ...
1
vote
2answers
87 views

Is there a bash helper that show common examples while typing

Is there a script or configuration or other tool that can show you inline most common examples of usage of given command for ex. user type:tar and it shows tar xzvf my-archive.tar.gz ls and it ...
3
votes
1answer
80 views

How can I get bash command line completion to complete a partial argument and then provide more hints

Imagine I have a command 'command' which takes arguments foo:bar foo:foo bar:bar or bar:fooI can write a command line completion script that I can source into my environment to give me completion ...
0
votes
0answers
46 views

shell script not using locale set

I have an image which is built:FROM debian:stretch# Set Bash as default shellRUN rm /bin/sh && \ln --symbolic /bin/bash /bin/sh# apt-getRUN apt-get update && \apt-...
0
votes
0answers
39 views

How to change the highlight in Notepad ++ for variables in double quotes?

How can I change the highlight for the variable that in the double quotes with Notepad ++?I would like have the variable "$1" like in the example if [ ! -z "$1" ] and all the others within double ...
1
vote
0answers
56 views

How to check on Ubuntu 17.10 the percent power from a bluetooth device at command line?

Would like to know how to check the charge from a device connected on laptop with Ubuntu 17.10. Tried with bt-device without success (bluez packages):root@ubuntubox:/home/marlon# bt-device -lAdded ...
2
votes
0answers
47 views

When is .bashrc executed

I was reading some text and it states:The .bashrc shell configuration file is actually executed each timeyou generate a BASH shell, such as when you run a shell script. Inother words, each ...
0
votes
1answer
59 views

fping – How to make fping result always sequential in order of command line

I want to get the result of fping always sequentialin the order of the command line arguments.For example, the command:fping -e 151.101.129.164 8.8.8.8might give the output:8.8.8.8 is alive (...
0
votes
0answers
64 views

What is the equivalent Linux shell command in Windows Command?

I have a Linux command written as below:$ ((cat file1.csv file2.csv | qs +) ; (cat file3.csv file4.csv | qs +)) | qs + |qs total | qs flip | qs meanWhat is the equivalent code for Windows Command ...
2
votes
1answer
42 views

Moving two specific files into its parent folder within multiple directories with unique names

I need to move two specific files, we'll call them fileA.txt and fileB.sh into its parent folder. One of these files is generic but the other file is specific to its parent folder and can't be ...
1
vote
1answer
31 views

How to take folder path in a variable opened by shell:startup in windows

Hi i am trying to create a script that can add other scripts in startup.'shell:startup' opens place to put the shortcut for startup programs, if i can somehow take its output in a variable, then i ...
0
votes
1answer
100 views

Bash script: Create a screen session and execute a command in it

I want to write a bash file, which starts a screen session and executes a command inside. The problem is, that it first creates a session and when you manually exited the session it executes the ...
2
votes
1answer
47 views

execute function in different shell

I usually zsh. I want to execute a function in bash and return back to my original shell. I can do this manually, but I want to automate it. How can I do that?For example, I am on zsh.I want to ...
0
votes
1answer
142 views

What is the right way to set $PATH variable in zshrc

When I first install zsh(oh-my-zsh), the ~/.zshrc file has the following lines by default -# If you come from bash you might have to change your $PATH.# export PATH=$HOME/bin:/usr/local/bin:$PATH...
1
vote
0answers
26 views

Cannot run GAP in cygwin

I've got GAP which I would like to run from inside emacs. There is something called gap mode for emacs which I installed. It obviously finds the correct executable to run GAP since it starts with the ...
0
votes
5answers
50 views

Command output print side by side

Following is my command output:# ls -la | grep -i text | awk '{print $9}' text1.txttext2.txttext3.txttext4.txtI wanted to print output value as:text1.txt:text2.txt:text3.txt:text4.txt
1
vote
1answer
107 views

Command line: How to handle spaces in filenames

I am measuring the total sizes of a bunch of files, whose paths I have stored in a text document, files.txt. Example contents of files.txt:file1.txtfile2.txtfile3.txtThis shell command gives me ...
1
vote
1answer
133 views

Running multiple shell instances with different parameters at the same time

Assume I have a python script that I want to run with different parameter combinations (I have MacBook Pro). If I use a shell script to do so (say run.sh), does it make sense to run run.sh multiple ...
1
vote
4answers
1k views

How to get string between the last two “/” symbols

I am using Bash. I have some string of paths, like /dir0/dir1/dir2/filename.ext and I want to extract the string dir2 in bash.You can assume that the word I want to extract is located between the two ...

153050per page