01-22-2009
Newbie help with New Line & Blank Line
I have this in my script:
usercount=`ldapsearch -L -b"ou=people,ou=$ou,dc=paisleyhosting,dc=com" -h"$server" -p"1391" cn=* nothing | grep -c dn`
admincount=`ldapsearch -b"ou=groups,ou=$ou,dc=paisleyhosting,dc=com" -h"$server" -p"1391" cn=USERADMIN* uniquemember | grep uniquemember | sort -u | grep -c unique`
adminusers=`ldapsearch -b"ou=groups,ou=$ou,dc=paisleyhosting,dc=com" -h"$server" -p"1391" "(&(objectclass=groupofuniquenames)(cn=useradministrator))" uniquemember | grep uniquemember | cut -d "," -f 1 | cut -d "=" -f 3`
I want to insert a New Line after "admincount" and a Blank Line after "adminsuers" ...
Can you help?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I hope this makes sense, but I need help with what is indicated with %%, below :
A.) ####List active servers and send to file####
# ps -ef | grep jboss | grep sh | awk '{if ($14) {print $12;}else {print $11}}' | sort > /export/home/kthatch/script_results
client302
client306
client309... (1 Reply)
Discussion started by: kthatch
1 Replies
2. Shell Programming and Scripting
Hi,
I want to write a sed script which from
batiato:
batiato/giubbe:
pip_b.2.txt
pip_b.3.txt
pip_b.3mmm.txt
bennato:
bennato/peterpan:
123.txt
consoli:
pip_a.12.txt
daniele: (2 Replies)
Discussion started by: one71
2 Replies
3. UNIX for Dummies Questions & Answers
I've shell script where i used the below command to take the line which contains patterns.
sed -n "/$year 05:/,/$year 17:/p" trace.log | grep -f patterns.txt > output.log
This was working fine for long time, but now a days this script is not working with and throwing error like
sed:... (8 Replies)
Discussion started by: senthil.ak
8 Replies
4. Shell Programming and Scripting
Hi Guys,
I have a file in which each set of records are separated by two blank line. I want to replace it with a single blank line.
Can you guys help me out?
Regards,
Magesh (9 Replies)
Discussion started by: mac4rfree
9 Replies
5. Shell Programming and Scripting
FIle A
"A" 2 aa 34
3 ac
5 cd
"B" 3 hu 67
4 fg
5 gy
output shud be
A"" 2 aa 34
"A" 3 ac 34
"A" 5 cd 34
"B" 3 hu 67
"B" 4 fg 67
"B" 5 gy 67 (6 Replies)
Discussion started by: cdfd123
6 Replies
6. Shell Programming and Scripting
Hi,
I have a file, say files_list, as below (o/p of ls -R cmd)
$ cat files_list
/remote/dir/path/to/file:
sub-dir1
sub-dir2
sub-dir3
...
/remote/dir/path/to/file/sub-dir1:
remote_file1.csv.tgz
<blank line 1>
/remote/dir/path/to/file/sub-dir2:
remote_file2.csv.tgz
<blank... (3 Replies)
Discussion started by: dips_ag
3 Replies
7. Shell Programming and Scripting
Dear all
I want to search special string in file and then print next all line in one line until blank lines come. Help me plz for same. My input file and desire op file is as under.
i/p file:
A1/EXT "BSCABD1_21233G1" 757 130823 1157
RADIO X-CEIVER ADMINISTRATION
BTS EXTERNAL FAULT
... (7 Replies)
Discussion started by: jaydeep_sadaria
7 Replies
8. Shell Programming and Scripting
Hello,
I need a program that read a file line by line and prints out lines 1, 2 & 3 after an empty line... An example of entries in the file would be:
SRVXPAPI001 ERRO JUN24 07:28:34 1775
REASON= 0000, PROCID= #E506 #1065: TPCIPPR, INDEX= 003F
... (8 Replies)
Discussion started by: Ferocci
8 Replies
9. Shell Programming and Scripting
Hello,
I have a file as :-
ABC
DEF
GHI
JKL
<BlankLine>
MNO
PQR
STU
VWX
<BlankLine>
YZA
I need it as below:-
ABCDEFGHIJKL;
MNOPQRSTUVWX; (3 Replies)
Discussion started by: jassi10781
3 Replies
10. Shell Programming and Scripting
Dear All,
In a CSV file, say that a given column has been extracted. In that column, information is missing (i.e. blank lines appear). I would like to replace the blank lines by the last valid line (not blank) previously read.
For example, consider the extract below:
123
234
543
111... (7 Replies)
Discussion started by: bagvian
7 Replies
LEARN ABOUT DEBIAN
ttk::combobox
ttk::combobox(3tk) Tk Themed Widget ttk::combobox(3tk)
__________________________________________________________________________________________________________________________________________________
NAME
ttk::combobox - text field with popdown selection list
SYNOPSIS
ttk::combobox pathName ?options?
_________________________________________________________________
DESCRIPTION
A ttk::combobox combines a text field with a pop-down list of values; the user may select the value of the text field from among the values
in the list.
STANDARD OPTIONS
-class -cursor -takefocus
-style
See the ttk_widget manual entry for details on the standard options.
WIDGET-SPECIFIC OPTIONS
Command-Line Name:-exportselection
Database Name: exportSelection
Database Class: ExportSelection
Boolean value. If set, the widget selection is linked to the X selection.
Command-Line Name:-justify
Database Name: justify
Database Class: Justify
Specifies how the text is aligned within the widget. Must be one of left, center, or right.
Command-Line Name:-height
Database Name: height
Database Class: Height
Specifies the height of the pop-down listbox, in rows.
Command-Line Name:-postcommand
Database Name: postCommand
Database Class: PostCommand
A Tcl script to evaluate immediately before displaying the listbox. The -postcommand script may specify the -values to display.
Command-Line Name:-state
Database Name: state
Database Class: State
One of normal, readonly, or disabled. In the readonly state, the value may not be edited directly, and the user can only select one
of the -values from the dropdown list. In the normal state, the text field is directly editable. In the disabled state, no inter-
action is possible.
Command-Line Name:-textvariable
Database Name: textVariable
Database Class: TextVariable
Specifies the name of a global variable whose value is linked to the widget value. Whenever the variable changes value the widget
value is updated, and vice versa.
Command-Line Name:-values
Database Name: values
Database Class: Values
Specifies the list of values to display in the drop-down listbox.
Command-Line Name:-width
Database Name: width
Database Class: Width
Specifies an integer value indicating the desired width of the entry window, in average-size characters of the widget's font.
WIDGET COMMAND
The following subcommands are possible for combobox widgets:
pathName current ?newIndex?
If newIndex is supplied, sets the combobox value to the element at position newIndex in the list of -values. Otherwise, returns the
index of the current value in the list of -values or -1 if the current value does not appear in the list.
pathName get
Returns the current value of the combobox.
pathName set value
Sets the value of the combobox to value.
The combobox widget also supports the following ttk::entry widget subcommands (see ttk::entry(3tk) for details):
bbox delete icursor index insert selection xview The combobox widget also sup-
ports the following generic ttk::widget widget subcommands (see ttk::widget(3tk) for details): cget config-
ure identify instate state
VIRTUAL EVENTS
The combobox widget generates a <<ComboboxSelected>> virtual event when the user selects an element from the list of values. If the selec-
tion action unposts the listbox, this event is delivered after the listbox is unposted.
SEE ALSO
ttk::widget(3tk), ttk::entry(3tk)
KEYWORDS
choice, entry, list box, text box, widget
Tk 8.5 ttk::combobox(3tk)