10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello experts,
I have a text file with lot of curly brackets (both opening { & closing } ). I need to delete them alongwith the text between opening & closing brackets' pair.
For ex: Input:-
59. Rh1 Qe4 {(Qf5-e4 Qd8-g8+ Kg6-f5
Qg8-h7+ Kf5-e5 Qh7-e7+ Ke5-f5 Qe7-d7+ Qe4-e6 Qd7-h7+ Qe6-g6... (6 Replies)
Discussion started by: prvnrk
6 Replies
2. Shell Programming and Scripting
Is this a bash or wget issue?
GNU bash, version 4.4.0(1)-release (x86_64-slackware-linux-gnu)
GNU Wget 1.18 built on linux-gnu.
If I run wget -O file localhost/{2..4} from the command line, it will download pages 2 to 4 and concatenate them to file - which is what I want.
If I put this in a... (4 Replies)
Discussion started by: Ray-V
4 Replies
3. Shell Programming and Scripting
I have a script which reads a number out of a log file. The pertinent line is this:
cat /tmp/listofnumbers
When I run cat /tmp/listofnumbers what I am seeing is on each line.
I am trying to make the script read from that file and grep for a variable like the following line should do:
... (4 Replies)
Discussion started by: newbie2010
4 Replies
4. Shell Programming and Scripting
I need help to store the value returned from the function to one variable and then use that variable.
PREVIOUS_DATE_FUNCTION()
{
date '+%m %d %Y' |
{
read MONTH DAY YEAR
DAY=`expr "$DAY" - 1`
case "$DAY" in
0)
MONTH=`expr "$MONTH" - 1`
case... (1 Reply)
Discussion started by: aroragaurav.84
1 Replies
5. Shell Programming and Scripting
Hi Guys,
I want to set a variable which happend to have square brackets in them. I tried multiple ways that is by escaping it with quotes (both single and double ) but it didn't help.
All I want is:
set x = slicearray.slice\.post
My failed attempts were:
set x = "slicearray.slice\.post"... (3 Replies)
Discussion started by: dixits
3 Replies
6. Shell Programming and Scripting
Hi all,
I need help figuring out why my script won't work when envoked from web interface. First off, I'm fairly new to Linux and Shell scripting so, my apologies for being ignorant!
So I have a python script that I envoke through a web interface. This script envokes my shell script and... (8 Replies)
Discussion started by: arod291
8 Replies
7. Shell Programming and Scripting
I am trying to generate some scripts to help manage an Oracle database. When I check the value returned from Oracle it has a leading carriage return in the variable. Is there a way to prevent this? Is there a way to easily strip out the carriage return. See code and output below.
... (7 Replies)
Discussion started by: Panzer993
7 Replies
8. UNIX for Dummies Questions & Answers
I get an error when I grep my results into a variable when the grep finds more than one file.
FND="$(find ediout* -mmin -60)"
if ; then
STR="$(find ediout* -mmin -60 -exec grep -l "ERRORS Encountered" {} +)"
fi
When there is only one ediout file it works fine. How do I... (11 Replies)
Discussion started by: aispg8
11 Replies
9. Shell Programming and Scripting
hello
I have a file with lines of info separated with "|"
I want to amend the second field of the last line, using AWK
my problem is with geting awk to return the last line
this is what I am using
awk 'END{ print $0 }' myFile
but I get an empty result
I tried the... (13 Replies)
Discussion started by: TasosARISFC
13 Replies
10. UNIX for Dummies Questions & Answers
Hello,
I have done a great deal of research on this and still cannot come to an understanding of the following:
In if-else statements in shell scripting I have seen examples of single brackets, double brackets, single parantheses, and double paratheses. When should each one be used?
And... (2 Replies)
Discussion started by: mojoman
2 Replies