Skip to main content

All Questions

Tagged with
-2 votes
0 answers
24 views

Understanding the Connection and Differences between Shell, Bash, Unix, Linux [closed]

This is my first question on StackOverflow!Over the last months, I have been struggling to get my mind around the topics that I have mentioned above in the title.I have been trying to learn key-...
funky13's user avatar
-1 votes
0 answers
12 views

character like '\' coming in SQL output while assigning the output to a variable in shell script [duplicate]

I am trying to run a SQL query in shell script and assigning its output to a variable. When I run the script in Putty in the output variable character like \ is coming in data. But when I run the same ...
Rohit Bansal's user avatar
-2 votes
0 answers
24 views

Unable to read multiple output returned from a sql query in shell script [closed]

How can I read multiple columns output from a sql and assign them to a variable and then read each row returned one by one and use those variables in each loop run to perform my if else function ...
Rohit Bansal's user avatar
-3 votes
0 answers
21 views

Find Todays file only in unix using find command [duplicate]

find -maxdepth 1 -type f -mtime -1 find -iname 'file_name*.gz' -mtime -1 why the commands giving me files from yesterday's date. Require: - how to fetch some particular files created for today's date ...
PCM's user avatar
  • 1
1 vote
1 answer
67 views

Multiprocessing in bash [duplicate]

I wrote a script (wrapper) over one python project. here are the links: https://github.com/daniellerch/aletheia https://daniellerch.me/stego/aletheia/intro-en/#aletheia-commands The essence of the ...
Sasha's user avatar
  • 11
1 vote
2 answers
49 views

`find` behaves unintuitively when pruning directories

I have few files under the current directory, ./a.txt ./b.txt ./dir1/c.txt ./dir1/d.txt When I execute find . -path './dir1' -prune -o -name "*.txt", as expected, it excludes everything ...
nabik's user avatar
  • 25
-2 votes
2 answers
46 views

Shell Bash Comparing expr result of IF [duplicate]

I am learning shell bash now, and tried to figure it out how to compare expr result on IF condition. Basically want to return only odd natural numbers The code a=1 while [ $a -lt 10 ] do echo &...
deSharp's user avatar
0 votes
1 answer
42 views

Retrieving user and group name of a file and storing it in different variables in Linux using Ansible

How to retrieve the user and group name associated with a file in Linux using Ansible, i repeat not id's but names. Or if there is any shell command that i can use in Ansible. I checked even in the ...
Debdas's user avatar
  • 11
0 votes
3 answers
133 views

How do I exit from nested shells at the command line without accidentally closing/exiting my terminal?

If I am typing in a terminal and do this % bash % [enter many commands in this shell] % bash % [enter many commands in this shell] . . . (could be zsh instead of bash) and I forget how many shells ...
bjc's user avatar
  • 1,262
0 votes
1 answer
54 views

bash script - check number of input arguments based on one input argument value

I have to create a bash script for which i need to give input arguments based on action type: insert/update. In case of insert the bash script will need 3 input arguments but in case of update are ...
Mathew Linton's user avatar
0 votes
0 answers
29 views

Shell script - shh remote connection - need to press control C to execute touch commands [duplicate]

#!/bin/bash if ssh -o StrictHostKeyChecking=no userid@serverip 'df -h'; then echo "Conn Success" array12=( /home/uid/test ...
naikum's user avatar
  • 71
0 votes
0 answers
45 views

sh spawn expect - handling multiple lines in expect command

I am encrypting source files using PGP encryption. After importing the key, every time I run the script it is expecting a confirmation. But in Production I am planning to use spawn and expect commands,...
Giri Sreerangam's user avatar
-1 votes
1 answer
60 views

how to print block like characters in unix

How can I make "▒" in unix shell script like this -->
charmander's user avatar
1 vote
1 answer
53 views

Assign maxsize for disk space using shell scrip

I want to create a script whereby I need to assign the MAXAVAILSIZE of disk space. And, when the Avail size is greater than or equal to the MAXAVAILSIZE, it will gzip the log files. Example: ...
user080320's user avatar
0 votes
0 answers
56 views

Can we use SFTP GET command to retrieve the latest file from the directory? [duplicate]

I looked for a solution to retrieve the latest file from the directory and found in google in this very website. latest_remote_file = $(ssh username@server_name 'ls -tr /path | tail -n 1') scp -r ...
Brindha Sharadha's user avatar

15 30 50 per page
1
2 3 4 5
811