11-15-2010
thanks so much worked!
i have one more question if you can..
how can i make
dc=james,dc=morey,dc=home,dc=com
to be "james.morey.home.com"
in another ldapsearch
so i can put that into different variable
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
With cut -c 8-13 myfile,
I am getting some numeric value.
In my shell script I am trying to assign something like this,
var=cut -c 8-13 myfile
But at the time of execution I am getting -c is not found.
If I dont assign, then script executes well.
Can we not simply use the value from one... (8 Replies)
Discussion started by: videsh77
8 Replies
2. Shell Programming and Scripting
I am new to unix shell scripting.
I was trying to convert each lines in a file to upper case.
I know how to convert the whole file.
But here i have to do line by line.
I am getting it in the below mentioned script
#!/bin/bash
#converting lower to upper in a file
#tr "" "" <file1... (3 Replies)
Discussion started by: jpmena
3 Replies
3. Shell Programming and Scripting
Hi
I am trying to store the output of awk into a variable in a shell script. I can run it successfully from the command line but not from a ksh shell script.
ls -al test.txt | grep -v grep | awk '{print $1}'
returns -rw-r--r--
#!/bin/ksh
perm=$(`ls -al test.txt | grep -v grep | awk... (2 Replies)
Discussion started by: mace_560
2 Replies
4. Shell Programming and Scripting
i have to do a check in my UNIX script to see whats saved in the database. depending on whats there will fork data to certain functions. However i do not know how to capture SQL output into a UNIX variable.
Below is what i have tried, but i get an error:
Error 3706 Failure 3706 Syntax error:... (3 Replies)
Discussion started by: purplebirky
3 Replies
5. Shell Programming and Scripting
I am new to shell programming, i have a requierement to assign a file name into a variable.
for ex:
the file name are below
603_2009_09_24_34.csv
702_2009_10_25_10.csv
for ex: i need to get the file 603_2009_09_24_34.csv but first 3 didgits are fixed but rest of the digits are not
below is... (3 Replies)
Discussion started by: Devendar
3 Replies
6. Shell Programming and Scripting
Hi i have a problem in redirecting the ouput to a variable.I want to use that variable in the script itself.
here is my problem...
unique.out "UNIX" | grep Encrypted | awk '{FS=" "} {print $2}' .
unique.out is and executable file that generates uniqe id WITH THE FOLLOWING FORMAT.
... (1 Reply)
Discussion started by: Reddy482
1 Replies
7. Shell Programming and Scripting
Hi,
I have a 3rd party tool on Solaris 8. I am running it thorugh my script but I am not able to capture its output into a variable.
Like, I tried, but did not work.
output=`/usr/bin/myTool`
echo $output
Also, I tried saving in a file but when I run, output is always shown on the... (19 Replies)
Discussion started by: angshuman_ag
19 Replies
8. Shell Programming and Scripting
Hi all,
Hope someone can help me out here.
I have this BASH script (see below)
My problem lies with the variable path.
The output of the command find will give me several fields. The 9th field is the path. I want to captured that and the I want to filter this to a specific level.
The... (6 Replies)
Discussion started by: Cowardly
6 Replies
9. Shell Programming and Scripting
root@SDP_Gaming_Socketed_GT3-1:/# rngd -r /dev/urandom -v
Available entropy sources:
Intel/AMD hardware rng
DRNG
root@SDP_Gaming_Socketed_GT3-1:/# x=`rngd -r /dev/urandom -v`
root@SDP_Gaming_Socketed_GT3-1:/# echo "$x" #get nothing
root@SDP_Gaming_Socketed_GT3-1:/# x=`eval rngd -r... (6 Replies)
Discussion started by: yanglei_fage
6 Replies
10. UNIX for Advanced & Expert Users
I have a below syntax its working fine...
var12=$(ps -ef | grep apache | awk '{print $2,$4}')
Im getting expected output as below:
printf "%b\n" "${VAR12}"
dell 123
dell 456
dell 457
Now I wrote a while loop.. the output of VAR12 should be passed as input parameters to while loop and results... (5 Replies)
Discussion started by: sam@sam
5 Replies
LEARN ABOUT DEBIAN
stag-flatten
STAG-FLATTEN(1p) User Contributed Perl Documentation STAG-FLATTEN(1p)
NAME
stag-flatten - turns stag data into a flat table
SYNOPSIS
stag-flatten -c name -c person/name dept MyFile.xml
DESCRIPTION
reads in a file in a stag format, and 'flattens' it to a tab-delimited table format. given this data:
(company
(dept
(name "special-operations")
(person
(name "james-bond"))
(person
(name "fred"))))
the above command will return a two column table
special-operations james-bond
special-operations fred
If there are multiple values for the columns within the node, then the cartesian product will be calculated
USAGE
stag-flatten [-p PARSER] [-c COLS] [-c COLS] NODE <file>
ARGUMENTS
-p|parser FORMAT
FORMAT is one of xml, sxpr or itext
xml assumed as default
-c|column COL1,COL2,COL3,..
the name of the columns/elements to write out
this can be specified either with multiple -c arguments, or with a comma-seperated (no spaces) list of column (terminal node) names
after a single -c
-n|nest
if set, then the output will be a compress repeating values into the same row; each cell in the table will be enclosed by {}, and will
contain a comma-delimited set of values
SEE ALSO
Data::Stag
perl v5.10.0 2008-12-23 STAG-FLATTEN(1p)