10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
How to remove first pair of parentheses and content in them from the beginning of the line?
Here's the list:
Here's what I already tried with GNU sed:
sed -e... (6 Replies)
Discussion started by: useretail
2. Shell Programming and Scripting
This is my input file:
My output file should look like:
That is, pipe is the delimiter. The data within pipe must be displayed as it is but if it encounters any data within parentheses, then only the data within parentheses has to be displayed ( the data... (2 Replies)
Discussion started by: ksatish89
3. Shell Programming and Scripting
I was looking at a script in my little book on bash and saw that one of the if statements had parentheses instead of brackets for the condition. I've been trying to find in my book where it talks about parentheses (because the examples on the if statement in an earlier chapter doesn't seem to... (3 Replies)
Discussion started by: Straitsfan
4. Shell Programming and Scripting
Hi.could you explain me what are the rules when we are using double parentesis in if statement,if I put ,the code is working ,with (( is not
if (($# > 0))
if ((! -d "$1"))
echo "Directory $1 not found"
fi (8 Replies)
Discussion started by: lio123
5. UNIX for Dummies Questions & Answers
I tried to adapt bartus's solution to my problem, without success. I want to replace all the occurences of this:
, where something can contain an arbitrary number of balanced parens and brakets.
Any ideas ?
Best, (1 Reply)
Discussion started by: ff1969ff1969
6. Shell Programming and Scripting
I have a file with numbers like this :
Now, I need to insert parentheses to each and every line like below :
can anyone tell me a solution? (8 Replies)
Discussion started by: sudharsan23
7. Shell Programming and Scripting
Let's say I'm trying to match potentially multiple sets of parentheses. Is there a way in a regular expression to force a match of closing parentheses specifically in the number of the opening parentheses?
For example, if the string is "((foo bar))", I want to be able to say "match any number of... (7 Replies)
Discussion started by: cvp
8. UNIX for Dummies Questions & Answers
hi, unix gurus.
i am wondering if someone can give me a clear explanation of the differneces between parentheses and brackets, both single and double.
i have heard that double parentheses (( are used for numerical expressions and that single brackets [ are used for strings. but i see... (1 Reply)
Discussion started by: ankimo
9. Shell Programming and Scripting
I would like to replace a comma in parentheses to a semicolon for example. Other commas outside () stay unchanged. How can I do this?
Thanks (5 Replies)
Discussion started by: lalelle
10. Shell Programming and Scripting
I'm trying to use the following command to do a batch find and replace in all commonly named files through a file hierarchy
find . -name 'file' |xargs perl -pi -e 's/find/replace/g'
which works fine except for a substitution involving parenthesis.
As a specific example I'm trying to sub... (3 Replies)
Discussion started by: Jeffish