Can't run shell script from other shell script
Bash |
https://codedump.io/share/V9zUPdecgrjn
|
I'm trying to run a shell script that calls another shell script:
#!/bin/sh
for k in `cat ../config/file1.keywords`
do
echo "*** keyword: $k ***"
...
5 years ago
unable to execute shell_exec() with variable
Bash |
https://codedump.io/share/OIAd43YrJJ
|
I'm trying to run shell_exec() with variable passed with AJAX from client.
This code causes error (input file doesn't exist!):
$searched_image = es...
5 years ago
set variable on the same line as command
Bash |
https://codedump.io/share/qf4wsPDElXd9
|
In sh programming I can do:
dryrun="echo " ./myscript.sh
And script uses it as:
${dryrun}ls -l (as an example)
I can't seem to figure out how to...
5 years ago
How to display the longest line from user input
Bash |
https://codedump.io/share/bIuOOM88dcFV
|
I have a shell script that need to ask the user for 4 lines of input. Then I need to display the longest line that was entered, and then whole input i...
5 years ago
GREP search modification: filter by string
Bash |
https://codedump.io/share/9IQSRxATlop
|
I have following grep command which looks for 'Exception in' string in the logs for past 24 hours via remote machine and prints out next 40 lines.
ss...
5 years ago
Iterating over associative array in bash
Bash |
https://codedump.io/share/ZQot2pfXmv7
|
I am renaming strings recursively using an associative array. Th array part is working, when I echo $index & ${code_names[$index]}they print corre...
5 years ago
Unix: removing duplicate lines without sorting
Bash |
https://codedump.io/share/LezNqO4DIYoK
|
I have a utility script in Python:
#!/usr/bin/env python
import sys
unique_lines = []
duplicate_lines = []
for line in sys.stdin:
if line in unique...
5 years ago