Search Results

Search: Posts Made By: zigizag
9,705
Posted By Corona688
Bumping up posts or double posting is not...
Bumping up posts or double posting is not permitted in these forums.

Please read the rules (https://www.unix.com/misc.php?do=cfrules), which you agreed to when you registered, if you have not...
2,383
Posted By Yoda
OK, if this is your input file then simply match...
OK, if this is your input file then simply match urls. Replace existing with:
while read line
do
[[ "$line" =~ server1\.ux\.com ]] && url_s1=${line##*: }
[[ "$line" =~...
2,383
Posted By Yoda
Make sure you have each line starting with an...
Make sure you have each line starting with an asterisk * and not any other character.

Also put an asterisk after character class [[:blank:]] to check zero or more occurrence:
[[ "$line" =~...
9,705
Posted By Yoda
I have answered your other thread...
I have answered your other thread (https://www.unix.com/shell-programming-scripting/216761-script-reading-file-send-firefox.html#post302773575)
2,383
Posted By Yoda
It works for me! It should be something to...
It works for me!

It should be something to do with your input file. Can you post few lines from your original input file in code tags ?
2,383
Posted By Yoda
Try: [[ "$line" =~ ^\*[[:blank:]]server1.com ]]...
Try:
[[ "$line" =~ ^\*[[:blank:]]server1.com ]] && url_s1=${line##*: }
[[ "$line" =~ ^\*[[:blank:]]server2.com ]] && url_s1=${line##*: }
[[ "$line" =~ ^\*[[:blank:]]server3.com ]] &&...
2,383
Posted By Yoda
Please always wrap code fragments or data samples...
Please always wrap code fragments or data samples in code tags

Here is modified code that redirects output to file: output.txt
#!/bin/bash

while read line
do
[[ "$line" =~...
2,383
Posted By Yoda
To give you an idea, here is a script that ...
To give you an idea, here is a script that

1. Read from file: 1.txt

2. Check if the entry corresponds to server1.com

3. Print each URLs:
#!/bin/bash

while read line
do
[[...
724
Posted By Yoda
Use an infinite while loop with another menu...
Use an infinite while loop with another menu option to quit:
#!/bin/bash

while :
do
echo " welcome to the menu bar"

echo " [a] restart server1.com"
echo " [b]...
1,125
Posted By Scott
The mount command mounts filesystems, not...
The mount command mounts filesystems, not libraries. Is this "library" a filesystem, or just a file?
1,125
Posted By vbe
That can only be done using NFS... Your...
That can only be done using NFS... Your workstation has to have the NFS server (service that is...) running and has to export your directory allowing only your Linux server to mount... Be aware that...
1,581
Posted By Scrutinizer
Try calling the script itself with nohup: nohup...
Try calling the script itself with nohup:
nohup ./test.sh &
Please use code tags (https://www.unix.com/how-post-unix-linux-forums/167686-forum-video-tutorial-how-use-code-tags.html)
1,581
Posted By fpmurphy
Use disown if you forgot to start job with nohup....
Use disown if you forgot to start job with nohup. The -a option means all jobs that you have started.

Note disown is not available in all shells.
1,581
Posted By Scrutinizer
See man nohup
See man nohup
2,714
Posted By vbe
I just put your script in order ( for me to...
I just put your script in order ( for me to read...):

#! /bin/bash
while true
do
proc_num=$(ps a | grep yourscript | wc -l)
echo "loop1: "proc_num=$proc_num
sleep 2
while ((...
2,714
Posted By bakunin
"bash" is a shell, not a script. If you search...
"bash" is a shell, not a script. If you search for "bash" in the process list you will find your scripts (because the use "bash" as their environment), but also interactive shells, login shells,...
2,714
Posted By vbe
Im very busy at the moment so have not much time...
Im very busy at the moment so have not much time to go in details...
The output of your ps might have helped us you know... (the complete!)
Look at the line 3 of your script...
1,425
Posted By Skrynesaver
You're one loop short ;) #! /bin/bash ...
You're one loop short ;)

#! /bin/bash
while true ; do
proc_num=$(ps -a | grep bash | wc -l)
while(( "$proc_num" < "5")) ; do
bash #add a single process
done
sleep 10; #let...
Showing results 1 to 18 of 18

 
All times are GMT -4. The time now is 04:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy