Bash script: "mkdir -p" doesn't work with var(cat x)
Hello,
I've an issue with the creation of a directory, All work without it So, below, my scripts with the debug output :
Config File :
Debug
For the first IP CLIENT there aren't problem, but for the next (Assuming that the $HOSTNAME directory does not exist) it doesn't work, it even not treat the command :
I tried with a simple condition [[ -d $dir ]] I've the same result..
Please who can I help me ?
---------- Post updated at 02:49 PM ---------- Previous update was at 01:58 PM ----------
The problem was a "rights issue".. I copied my original script for my tests with the root right and when I executed the copied script with the user_test, it did not have the right to create the directory, stupid mistake.. I hope have helped others
Last edited by Arnaudh78; 12-07-2016 at 03:14 PM..
Glad you got it working, thanks for coming back to report the problem. Very strange how it did not report mkdir -p in the log file, or any of its error messages.
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Hi All,
I'm completely new to bash scripting and still learning my way through albeit vey slowly.
I need to know where to insert my server names', my ip address numbers through out the script alas to no avail.
I'm also searching on how to save .sh (bash shell) script properly.... (25 Replies)
Working with IP addresses is a pain...
Here's my problem: I'm putting some interface information to a file:
3.185.201.2 | Tu1102
152.162.54.130 | Gi0/2.36
3.185.226.2 | Gi0/1
3.185.0.82 | Tu1
... (12 Replies)
More issues. The "|" key doesn't work at all, either in the text terminal or in mwm (which starts fine when I do "startx").
How am I supposed to troubleshoot without a "|" key? (2 Replies)
When I use "/" to look for a particular command that I typed in the current session it says
D02:-/home/user1/temp> /job
ksh: /job: not found.
D02:-/home/user1/temp>
previously it used to fetch all the commands which had job in it..
for example subjob, endjob, joblist etc...
may I... (7 Replies)
totally pis*ed off.
I have a data set (xxx.txt), as follows:
chr1 3821 rs127372 A/C 0.823
chr1 3822 rs127376 A/C/G 0.899
chr1 3722 rs612634 A/C 9.22
chr1 3262 rs7152 A/T 0.22
chr1 3711 rs737 A/C/G 0.2323
.......
I only want to get those lines... (6 Replies)
when i give "ps -elf" or "ps" system gets hung.
if i press "^c" come out from it...
pls help..what should i do to get it resolved.
thanks
CKanth (4 Replies)
How can I configure it?
I have a swedish keyboard with swedish keyboard setting. Everything works perfectly (едц) except that button. What can be wrong?
/Richard
++
NOTE: It seems like the computer notices the input but that the button isn't assigned to anything (the keyboard-cursor stops).... (1 Reply)
I'm using the case statement in the following script and it always takes the "*" default choice while it should be "3".
I wonder why ???
dt_auj=`date +%d`
NBLOG=`ls -al /users/notes01/LOG/t*|awk '{print $7}'|grep $dt_auj|wc -l`
case $NBLOG in
1) cat ~/LOG/console-notes > $fic_tmp1 ;;
2)... (5 Replies)