Sponsored Content
Full Discussion: Help is needed
Top Forums Shell Programming and Scripting Help is needed Post 94375 by matrixmadhan on Friday 30th of December 2005 01:14:15 AM
Old 12-30-2005
one more,

try this

Code:
# !/usr/bin/ksh

nestlevel=0
displaychar="__"
path=""

if [ $# -eq 0 ]
then
startdir=.
else
startdir="./"$1
fi

display()
{
app=""
temp=$nestlevel
while [ $temp -gt 0 ]
do
app=$app$displaychar
temp=$(($temp - 1))
done
echo $app$1
}

subdir()
{
path=$1
for subdir in `ls -l $1 | grep ^d | awk '{print $9}' 2>/dev/null`
do
display `basename $subdir`
nestlevel=$(($nestlevel + 1))
path=$path"/"$subdir
subdir $path
path=`echo $path | sed -e "s/\/'$subdir'//"`
done
nestlevel=$(($nestlevel - 1))
}

#Shoot here
for dir in `ls -l $startdir | grep ^d | awk '{print $9}' 2>/dev/null`
do
display `basename $dir`
nestlevel=$(($nestlevel + 1))
subdir $startdir"/"$dir
done

exit 0

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Help needed

Hello I am a newbie and want to learn unix . Does unix and linux are one and same. I have red hat linux cd but i want to take advice from some one wheather unix and linux are same. If not ,where i'll get a Unix os setup and how i'll install it. If linux would do then how should... (3 Replies)
Discussion started by: hunter87
3 Replies

2. UNIX for Dummies Questions & Answers

Help needed

HI can any one help me with the appropriate answers for the below: 1.Enter an # before a command and press .what do you see,and how do you think you can take advantage of the behaviour? 2.Is tar -cvfb20foo.tar*.c legitimate or not.will this command work without the - symbol? 3.The command... (1 Reply)
Discussion started by: akhil1460
1 Replies

3. AIX

Little help needed.

Hello, I am quite new to AIX, but have Linux experience. Iam facing a peoblem with AIX 5.2 running on a 43p Model 150 (RS6000). I tried everyting and i cant have the network to run properly. :confused: /etc/hosts looks like this: 127.0.0.1 loopback localhost 192.168.XXX.XXX... (5 Replies)
Discussion started by: Netghost
5 Replies

4. UNIX for Dummies Questions & Answers

little help needed..

hi everyone i'm a noob trying to learn unix language.. but seems like i got no leads on how to start.. i'm playing with the 'ps' command.. i'm trying to show the pid, ppid, username, command, cpu utilization (in desc order), process start time and process status.. all in a command.. am i able... (3 Replies)
Discussion started by: hilofat
3 Replies

5. UNIX for Dummies Questions & Answers

Help needed please.

i've been given an assignment to Write a system utility called recycle that satisfies the following requirements as they might be displayed in a UNIX/Linux man page: NAME recycle - stores files in a recycle bin SYNOPSIS recycle ... DESCRIPTION Recycle is a replacement for the... (3 Replies)
Discussion started by: jerryboy78
3 Replies

6. Shell Programming and Scripting

Help needed ....

Hi... I have a folder /home/data ;where some files are present. aaa_asas.txt bbb_xxx.txt ccc_xsxas.txt ddd_sa2esa.txt ------ Also I have a file which is as follows.(/home/file1) cat /home/file1 aaa you bbb are ccc very ddd good -------- now I want to rename all the files in the folder... (7 Replies)
Discussion started by: newbee1
7 Replies

7. Shell Programming and Scripting

help needed...

Guys, There is a file where there are 1000s of records. In the file if some condition satisfies in a certain TAB record (TAB would be first 3 digits of a certain record) then move TAB and all the records (or lines) after TAB to new_file, until another TAB record is encountered in the same... (1 Reply)
Discussion started by: Prat007
1 Replies

8. Shell Programming and Scripting

Help Needed

please reply for this https://www.unix.com/shell-programming-scripting/111493-cutting-lines.html its really urgent (1 Reply)
Discussion started by: jojo123
1 Replies

9. Linux

Help needed

hi experts, i am a beginner in AIX..recently got a chance to work with unix team. we have an interface server through which we connect to production servers.. there were lot of files inside root (/) of that interface server owned by different ppl...by mistake i changed the ownership and group of... (1 Reply)
Discussion started by: vinimerwe
1 Replies

10. Shell Programming and Scripting

Help needed

First of all, let me state that I am a windows admin. I have a windows share mounted to /mnt/server I need a script that will either login as sudo or perform commands with sudo rights. I need the script to copy all of the users /home folders to the mounted windows share. Now If I can... (2 Replies)
Discussion started by: EricM
2 Replies
__gnu_cxx::rope< _CharT, _Alloc >(3cxx) 								   __gnu_cxx::rope< _CharT, _Alloc >(3cxx)

NAME
__gnu_cxx::rope< _CharT, _Alloc > - SYNOPSIS
Inherits __gnu_cxx::_Rope_base< _CharT, _Alloc >. Public Types typedef _Rope_RopeConcatenation < _CharT, _Alloc > __C" typedef _Rope_RopeFunction < _CharT, _Alloc > __F" typedef _Rope_RopeLeaf< _CharT, _Alloc > __L" typedef _Rope_RopeSubstring < _CharT, _Alloc > __S" typedef _Alloc::template rebind< __C >::other _CAlloc" typedef _Alloc::template rebind< _CharT >::other _DataAlloc" typedef _Alloc::template rebind< __F >::other _FAlloc" typedef _Alloc::template rebind< __L >::other _LAlloc" typedef _Alloc::template rebind< __S >::other _SAlloc" typedef _Rope_const_iterator < _CharT, _Alloc > const_iterator" typedef const _CharT * const_pointer typedef _CharT const_reference typedef std::reverse_iterator < const_iterator > const_reverse_iterator" typedef ptrdiff_t difference_type typedef _Rope_iterator< _CharT, _Alloc > iterator" typedef _Rope_char_ptr_proxy < _CharT, _Alloc > pointer" typedef _Rope_char_ref_proxy < _CharT, _Alloc > reference" typedef std::reverse_iterator < iterator > reverse_iterator" typedef size_t size_type typedef _CharT value_type Public Member Functions rope (const _CharT *__s, const allocator_type &__a=allocator_type()) rope (const _CharT *__s, size_t __len, const allocator_type &__a=allocator_type()) rope (const _CharT *__s, const _CharT *__e, const allocator_type &__a=allocator_type()) rope (const const_iterator &__s, const const_iterator &__e, const allocator_type &__a=allocator_type()) rope (const iterator &__s, const iterator &__e, const allocator_type &__a=allocator_type()) rope (_CharT __c, const allocator_type &__a=allocator_type()) rope (size_t __n, _CharT __c, const allocator_type &__a=allocator_type()) rope (const allocator_type &__a=allocator_type()) rope (char_producer< _CharT > *__fn, size_t __len, bool __delete_fn, const allocator_type &__a=allocator_type()) rope (const rope &__x, const allocator_type &__a=allocator_type()) allocator_type & _M_get_allocator () const allocator_type & _M_get_allocator () const rope & append (const _CharT *__iter, size_t __n) rope & append (const _CharT *__c_string) rope & append (const _CharT *__s, const _CharT *__e) rope & append (const_iterator __s, const_iterator __e) rope & append (_CharT __c) rope & append () rope & append (const rope &__y) rope & append (size_t __n, _CharT __c) void apply_to_pieces (size_t __begin, size_t __end, _Rope_char_consumer< _CharT > &__c) const _CharT at (size_type __pos) const _CharT back () const void balance () const_iterator begin () const const_iterator begin () const _CharT * c_str () const void clear () int compare (const rope &__y) const const_iterator const_begin () const const_iterator const_end () const const_reverse_iterator const_rbegin () const const_reverse_iterator const_rend () const void copy (_CharT *__buffer) const size_type copy (size_type __pos, size_type __n, _CharT *__buffer) const void delete_c_str () void dump () bool empty () const const_iterator end () const const_iterator end () void erase (size_t __p, size_t __n) void erase (size_t __p) iterator erase (const iterator &__p, const iterator &__q) iterator erase (const iterator &__p) size_type find (_CharT __c, size_type __pos=0) const size_type find (const _CharT *__s, size_type __pos=0) const _CharT front () const allocator_type get_allocator () const void insert (size_t __p, const rope &__r) void insert (size_t __p, size_t __n, _CharT __c) void insert (size_t __p, const _CharT *__i, size_t __n) void insert (size_t __p, const _CharT *__c_string) void insert (size_t __p, _CharT __c) void insert (size_t __p) void insert (size_t __p, const _CharT *__i, const _CharT *__j) void insert (size_t __p, const const_iterator &__i, const const_iterator &__j) void insert (size_t __p, const iterator &__i, const iterator &__j) iterator insert (const iterator &__p, const rope &__r) iterator insert (const iterator &__p, size_t __n, _CharT __c) iterator insert (const iterator &__p, _CharT __c) iterator insert (const iterator &__p) iterator insert (const iterator &__p, const _CharT *c_string) iterator insert (const iterator &__p, const _CharT *__i, size_t __n) iterator insert (const iterator &__p, const _CharT *__i, const _CharT *__j) iterator insert (const iterator &__p, const const_iterator &__i, const const_iterator &__j) iterator insert (const iterator &__p, const iterator &__i, const iterator &__j) size_type length () const size_type max_size () const iterator mutable_begin () iterator mutable_end () reverse_iterator mutable_rbegin () reference mutable_reference_at (size_type __pos) reverse_iterator mutable_rend () rope & operator= (const rope &__x) _CharT operator[] (size_type __pos) const void pop_back () void pop_front () void push_back (_CharT __x) void push_front (_CharT __x) const_reverse_iterator rbegin () const const_reverse_iterator rbegin () const_reverse_iterator rend () const const_reverse_iterator rend () void replace (size_t __p, size_t __n, const rope &__r) void replace (size_t __p, size_t __n, const _CharT *__i, size_t __i_len) void replace (size_t __p, size_t __n, _CharT __c) void replace (size_t __p, size_t __n, const _CharT *__c_string) void replace (size_t __p, size_t __n, const _CharT *__i, const _CharT *__j) void replace (size_t __p, size_t __n, const const_iterator &__i, const const_iterator &__j) void replace (size_t __p, size_t __n, const iterator &__i, const iterator &__j) void replace (size_t __p, _CharT __c) void replace (size_t __p, const rope &__r) void replace (size_t __p, const _CharT *__i, size_t __i_len) void replace (size_t __p, const _CharT *__c_string) void replace (size_t __p, const _CharT *__i, const _CharT *__j) void replace (size_t __p, const const_iterator &__i, const const_iterator &__j) void replace (size_t __p, const iterator &__i, const iterator &__j) void replace (const iterator &__p, const iterator &__q, const rope &__r) void replace (const iterator &__p, const iterator &__q, _CharT __c) void replace (const iterator &__p, const iterator &__q, const _CharT *__c_string) void replace (const iterator &__p, const iterator &__q, const _CharT *__i, size_t __n) void replace (const iterator &__p, const iterator &__q, const _CharT *__i, const _CharT *__j) void replace (const iterator &__p, const iterator &__q, const const_iterator &__i, const const_iterator &__j) void replace (const iterator &__p, const iterator &__q, const iterator &__i, const iterator &__j) void replace (const iterator &__p, const rope &__r) void replace (const iterator &__p, _CharT __c) void replace (const iterator &__p, const _CharT *__c_string) void replace (const iterator &__p, const _CharT *__i, size_t __n) void replace (const iterator &__p, const _CharT *__i, const _CharT *__j) void replace (const iterator &__p, const_iterator __i, const_iterator __j) void replace (const iterator &__p, iterator __i, iterator __j) const _CharT * replace_with_c_str () size_type size () const rope substr (size_t __start, size_t __len=1) const rope substr (iterator __start, iterator __end) const rope substr (iterator __start) const rope substr (const_iterator __start, const_iterator __end) const rope< _CharT, _Alloc > substr (const_iterator __start) void swap (rope &__b) Static Public Member Functions static __C * _C_allocate (size_t __n) static void _C_deallocate (__C *__p, size_t __n) static _CharT * _Data_allocate (size_t __n) static void _Data_deallocate (_CharT *__p, size_t __n) static __F * _F_allocate (size_t __n) static void _F_deallocate (__F *__p, size_t __n) static __L * _L_allocate (size_t __n) static void _L_deallocate (__L *__p, size_t __n) static __S * _S_allocate (size_t __n) static void _S_deallocate (__S *__p, size_t __n) Public Attributes _RopeRep * _M_tree_ptr Static Public Attributes static const size_type npos Protected Types enum { _S_copy_max } typedef _Rope_base< _CharT, _Alloc > _Base" typedef _CharT * _Cstrptr typedef _Rope_RopeConcatenation < _CharT, _Alloc > _RopeConcatenation" typedef _Rope_RopeFunction < _CharT, _Alloc > _RopeFunction" typedef _Rope_RopeLeaf< _CharT, _Alloc > _RopeLeaf" typedef _Rope_RopeRep< _CharT, _Alloc > _RopeRep" typedef _Rope_RopeSubstring < _CharT, _Alloc > _RopeSubstring" typedef _Rope_self_destruct_ptr < _CharT, _Alloc > _Self_destruct_ptr" typedef _Base::allocator_type allocator_type Static Protected Member Functions static size_t _S_allocated_capacity (size_t __n) static bool _S_apply_to_pieces (_Rope_char_consumer< _CharT > &__c, const _RopeRep *__r, size_t __begin, size_t __end) static _RopeRep * _S_concat (_RopeRep *__left, _RopeRep *__right) static _RopeRep * _S_concat_char_iter (_RopeRep *__r, const _CharT *__iter, size_t __slen) static _RopeRep * _S_destr_concat_char_iter (_RopeRep *__r, const _CharT *__iter, size_t __slen) static _RopeLeaf * _S_destr_leaf_concat_char_iter (_RopeLeaf *__r, const _CharT *__iter, size_t __slen) static _CharT _S_fetch (_RopeRep *__r, size_type __pos) static _CharT * _S_fetch_ptr (_RopeRep *__r, size_type __pos) static bool _S_is0 (_CharT __c) static _RopeLeaf * _S_leaf_concat_char_iter (_RopeLeaf *__r, const _CharT *__iter, size_t __slen) static _RopeConcatenation * _S_new_RopeConcatenation (_RopeRep *__left, _RopeRep *__right, allocator_type &__a) static _RopeFunction * _S_new_RopeFunction (char_producer< _CharT > *__f, size_t __size, bool __d, allocator_type &__a) static _RopeLeaf * _S_new_RopeLeaf (_CharT *__s, size_t __size, allocator_type &__a) static _RopeSubstring * _S_new_RopeSubstring (_Rope_RopeRep< _CharT, _Alloc > *__b, size_t __s, size_t __l, allocator_type &__a) static void _S_ref (_RopeRep *__t) static _RopeLeaf * _S_RopeLeaf_from_unowned_char_ptr (const _CharT *__s, size_t __size, allocator_type &__a) static size_t _S_rounded_up_size (size_t __n) static _RopeRep * _S_substring (_RopeRep *__base, size_t __start, size_t __endp1) static _RopeRep * _S_tree_concat (_RopeRep *__left, _RopeRep *__right) static void _S_unref (_RopeRep *__t) static _RopeRep * replace (_RopeRep *__old, size_t __pos1, size_t __pos2, _RopeRep *__r) Static Protected Attributes static _CharT _S_empty_c_str [1] Friends class _Rope_char_ptr_proxy< _CharT, _Alloc > class _Rope_char_ref_proxy< _CharT, _Alloc > class _Rope_const_iterator< _CharT, _Alloc > class _Rope_iterator< _CharT, _Alloc > class _Rope_iterator_base< _CharT, _Alloc > struct _Rope_RopeRep< _CharT, _Alloc > struct _Rope_RopeSubstring< _CharT, _Alloc > template<class _CharT2 , class _Alloc2 > rope< _CharT2, _Alloc2 > operator+ (const rope< _CharT2, _Alloc2 > &__left, const rope< _CharT2, _Alloc2 > &__right) template<class _CharT2 , class _Alloc2 > rope< _CharT2, _Alloc2 > operator+ (const rope< _CharT2, _Alloc2 > &__left, const _CharT2 *__right) template<class _CharT2 , class _Alloc2 > rope< _CharT2, _Alloc2 > operator+ (const rope< _CharT2, _Alloc2 > &__left, _CharT2 __right) Detailed Description template<class _CharT, class _Alloc>class __gnu_cxx::rope< _CharT, _Alloc > This is an SGI extension. Todo Needs documentation! See http://gcc.gnu.org/onlinedocs/libstdc++/manual/documentation_style.html Definition at line 1521 of file rope. Author Generated automatically by Doxygen for libstdc++ from the source code. libstdc++ Tue Nov 27 2012 __gnu_cxx::rope< _CharT, _Alloc >(3cxx)
All times are GMT -4. The time now is 06:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy