Sponsored Content
Full Discussion: Add string to parentheses
Top Forums UNIX for Beginners Questions & Answers Answers to Frequently Asked Questions Add string to parentheses Post 302970460 by steve120 on Wednesday 6th of April 2016 06:31:40 PM
Old 04-06-2016
Add string to parentheses

Suppose I have this code :

Code:
int main () {   int i = NULL;  /* incorrect */   return 0; }

and I want to put the word
Quote:
void
between the two parentheses
like this :


Code:
int main (void) {   int i = NULL;  /* incorrect */   return 0; }

which command is used to do it in Linux ?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Parentheses in perl find/replace

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
3 Replies

2. Shell Programming and Scripting

Replace text in parentheses

Hi I would like to replace a comma in parentheses to a semicolon for example. Other commas outside () stay unchanged. How can I do this? aaaa,bbb,ccc,ddd(eee,fff,ggg),hhh,iii to aaaa,bbb,ccc,ddd(eee;fff;ggg),hhh,iii Thanks (5 Replies)
Discussion started by: lalelle
5 Replies

3. UNIX for Dummies Questions & Answers

brackets vs parentheses - single and double

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
1 Replies

4. Shell Programming and Scripting

Perl regex help - matching parentheses

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
7 Replies

5. Shell Programming and Scripting

How to insert Parentheses to each line in a file

Hi I have a file with numbers like this : 123 456 6798 9073233 12 8644 Now, I need to insert parentheses to each and every line like below : (123) (456) (6798) (9073233) (12) (8644) can anyone tell me a solution? (8 Replies)
Discussion started by: sudharsan23
8 Replies

6. UNIX for Dummies Questions & Answers

Replace all occurrences of strings with parentheses

Hi, I tried to adapt bartus's solution to my problem, without success. I want to replace all the occurences of this: with: , where something can contain an arbitrary number of balanced parens and brakets. Any ideas ? Best, (1 Reply)
Discussion started by: ff1969ff1969
1 Replies

7. Shell Programming and Scripting

Rules with using double parentheses in Bash

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 #!/bin/bash if (($# > 0)) then if ((! -d "$1")) then echo "Directory $1 not found" fi else echo Problem fi (8 Replies)
Discussion started by: lio123
8 Replies

8. Shell Programming and Scripting

When does an if statement need parentheses

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
3 Replies

9. Shell Programming and Scripting

Help with extracting data within parentheses

This is my input file: a|b|c(ef)|g|h(km)|p My output file should look like: a|b|ef|g|km|p 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
2 Replies

10. Shell Programming and Scripting

[All variants] remove first pair of parentheses

How to remove first pair of parentheses and content in them from the beginning of the line? Here's the list: (ok)-test (ok)-test-(ing) (some)-test-(ing)-test test-(ing) Desired result: test test-(ing) test-(ing)-test test-(ing) Here's what I already tried with GNU sed: sed -e... (6 Replies)
Discussion started by: useretail
6 Replies
QVBoxLayout(3qt)														  QVBoxLayout(3qt)

NAME
QVBoxLayout - Lines up widgets vertically SYNOPSIS
#include <qlayout.h> Inherits QBoxLayout. Public Members QVBoxLayout ( QWidget * parent, int margin = 0, int spacing = -1, const char * name = 0 ) QVBoxLayout ( QLayout * parentLayout, int spacing = -1, const char * name = 0 ) QVBoxLayout ( int spacing = -1, const char * name = 0 ) ~QVBoxLayout () DESCRIPTION
The QVBoxLayout class lines up widgets vertically. This class is used to construct vertical box layout objects. See QBoxLayout for more details. The simplest use of the class is like this: QBoxLayout * l = new QVBoxLayout( widget ); l->addWidget( aWidget ); l->addWidget( anotherWidget ); <center> [Image Omitted] </center> See also QHBoxLayout, QGridLayout, the Layout overview, Widget Appearance and Style, and Layout Management. MEMBER FUNCTION DOCUMENTATION
QVBoxLayout::QVBoxLayout ( QWidget * parent, int margin = 0, int spacing = -1, const char * name = 0 ) Constructs a new top-level vertical box called name, with parent parent. The margin is the number of pixels between the edge of the widget and its managed children. The spacing is the default number of pixels between neighboring children. If spacing is -1 the value of margin is used for spacing. QVBoxLayout::QVBoxLayout ( QLayout * parentLayout, int spacing = -1, const char * name = 0 ) Constructs a new vertical box called name name and adds it to parentLayout. The spacing is the default number of pixels between neighboring children. If spacing is -1, this QVBoxLayout will inherit its parent's spacing(). QVBoxLayout::QVBoxLayout ( int spacing = -1, const char * name = 0 ) Constructs a new vertical box called name name. You must add it to another layout. The spacing is the default number of pixels between neighboring children. If spacing is -1, this QVBoxLayout will inherit its parent's spacing(). QVBoxLayout::~QVBoxLayout () Destroys this box layout. The layout's widgets aren't destroyed. SEE ALSO
http://doc.trolltech.com/qvboxlayout.html http://www.trolltech.com/faq/tech.html COPYRIGHT
Copyright 1992-2001 Trolltech AS, http://www.trolltech.com. See the license file included in the distribution for a complete license statement. AUTHOR
Generated automatically from the source code. BUGS
If you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. Good bug reports help us to help you. Thank you. The definitive Qt documentation is provided in HTML format; it is located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. This man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech. If you find errors in this manual page, please report them to qt-bugs@trolltech.com. Please include the name of the manual page (qvboxlayout.3qt) and the Qt version (3.1.1). Trolltech AS 9 December 2002 QVBoxLayout(3qt)
All times are GMT -4. The time now is 10:46 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy