10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
Hello, everyone. I'm currently trying to write a command system for a Minecraft server using screen.
Here are the scripts I'm currently using.
0.sh
#!/bin/bash
screen -S Test114 -dm java -Xmx4G -jar server.jar nogui
1.sh
#!/bin/bash
args="$@"
args2="${args@Q}"
#args3=`printf '%q\n'... (2 Replies)
Discussion started by: Develon
2 Replies
2. Shell Programming and Scripting
So I understand that I should be able to ouput a literal \ by escaping it with a preceding \. My problem is that I am trying to ouput a script that will subsequently be run on a different system with UNC pathing, so I want to ouput two \\ in a row, but escaping them both in sequential order is not... (4 Replies)
Discussion started by: JourneyRider
4 Replies
3. Shell Programming and Scripting
I am currently reading a very old reference from O'Reilly: Sed and Awk 2nd Edition reprinted in 2000. So far, it's a solid read and still very relevant. I'd highly recommend this to anyone.
The only problem I have with this book is that I had to resort to bourne shell to get my examples to work... (3 Replies)
Discussion started by: ConcealedKnight
3 Replies
4. Shell Programming and Scripting
Please forgive me if this is the wrong forum. I want to execute some one liners with the groovy programming language and I'm having trouble escaping the special characters to accommodate bash.
Here is one of the lines that is giving me trouble:
groovy -e "(new... (1 Reply)
Discussion started by: siegfried
1 Replies
5. Shell Programming and Scripting
Hi
I use :
path=/var/www/admin
echo "$path" | sed -e 's/\//\\\//g'
this return
\/var\/www\/admin
and is ok.
but
path2=`echo "$path" | sed -e 's/\//\\\//g'`
echo $path2
return an error:
sed: -e expression #1, char 9: unknown option to `s'
Can anyone help me?
Thanks (3 Replies)
Discussion started by: georgian
3 Replies
6. Shell Programming and Scripting
I'm cleaning this from some html files
style=''
but when I try
's/style=\'\''//'
I get an unmatched ' error (4 Replies)
Discussion started by: dba_frog
4 Replies
7. Shell Programming and Scripting
Hello
This should be easy, but bash is giving me headaches.
At the command line the following command works:
duplicity --include /home --exclude '**' / file:///foo
Doing that from a script is not straightforward. Note that it is basically a requirement that I place the... (3 Replies)
Discussion started by: brsett
3 Replies
8. UNIX for Dummies Questions & Answers
I have a variable containt something like this, c:\mask\mask. How can I escape "\" in the values? I want the value as it it. (9 Replies)
Discussion started by: swmk
9 Replies
9. Shell Programming and Scripting
Hi all, i have a perl script. from within the perl script, i am calling a system command which i need to pass in a perl variable. but the variable substitution does not seems to happen. would like to find out where is the missing escape character or extra quotes;or what is my mistake.
... (2 Replies)
Discussion started by: new2ss
2 Replies
10. Shell Programming and Scripting
hi there. i have a simple bash script that reads a word from a text file
one at a time, and if a '*' character is encountered, it prints a message.
however it doesn't work as i expected. :o what am i doing wrong here?
thanks very much for the help :)
for word in `cat $DOC`
do
if... (18 Replies)
Discussion started by: mark_nsx
18 Replies