Sponsored Content
Top Forums Shell Programming and Scripting Need your help to get the output of the list in desired format Post 302541815 by rohit22hamirpur on Monday 25th of July 2011 11:33:12 PM
Old 07-26-2011
Need your help to get the output of the list in desired format

Hello Guys,

I am working on a script and using the below code to fetch the list of all repositories
CHDIR='/mnt/scm/subversion/'

repolist()
{
cd ${CHDIR}
Repo=`ls|cut -d " " -f1`
echo $Repo
}

Output of the above code is

BSB CIB COB DCI DIB DSB ESB-P ESB-TOOLS FareVerify GCACHE GWY IBMSOAMB IBMSOAWAS ISM KESTREL-DEV kestrel-migration KESTREL-UAPI KESTREL-XD LAMB LinuxAutomation MGLNO PORTAL repos4 SCMTools SESTOKEN SMB SOA SPLASH SSB STP TOI

Diretory from where I am fetching the list
[e030809@vhldvspusv011 ~]$ cd /mnt/scm/subversion/
[e030809@vhldvspusv011 subversion]$ pwd
/mnt/scm/subversion
[e030809@vhldvspuv011 subversion]$ ll -tr
total 124
drwxr-xr-x 7 apache apache 4096 May 21 2009 COB
drwxr-xr-x 7 apache apache 4096 May 26 2009 CIB
drwxr-xr-x 7 apache apache 4096 May 26 2009 DIB
drwxr-xr-x 7 apache apache 4096 Jun 24 2009 GCACHE
drwxr-xr-x 7 apache apache 4096 Jun 24 2009 LAMB
drwxr-xr-x 7 apache apache 4096 Jul 28 2009 ISM
drwxr-xr-x 7 apache apache 4096 Jul 28 2009 repos4
drwxr-xr-x 7 apache apache 4096 Jul 29 2009 ESB-P
drwxrwxr-x 7 apache apache 4096 Aug 19 2009 KESTREL-DEV
drwxrwxr-x 7 apache apache 4096 Aug 19 2009 KESTREL-UAPI
drwxrwxr-x 7 apache apache 4096 Sep 21 2009 KESTREL-XD
drwxrwxr-x 7 apache apache 4096 Oct 9 2009 SMB
drwxrwxr-x 7 apache apache 4096 Nov 19 2009 PORTAL
drwxrwxr-x 7 apache apache 4096 Jan 12 2010 MGLNO
drwxrwxr-x 7 apache apache 4096 Jan 21 2010 BSB
drwxrwxr-x 7 apache apache 4096 Jan 26 2010 SSB
drwxrwxr-x 7 apache apache 4096 Feb 18 2010 SPLASH
drwxrwxr-x 7 apache apache 4096 Apr 13 2010 ESB-TOOLS
drwxrwxr-x 6 apache apache 4096 Apr 23 2010 SOA
drwxrwxr-x 7 apache apache 4096 May 26 2010 SCMTools
drwxrwxr-x 7 apache apache 4096 Jun 15 2010 SESTOKEN
drwxrwxr-x 7 apache apache 4096 Nov 10 2010 LinuxAutomation
drwxrwxr-x 7 apache apache 4096 Dec 20 2010 TOI
drwxrwxr-x 7 apache apache 4096 Jan 21 2011 STP
drwxrwxr-x 7 apache apache 4096 Mar 11 20:59 IBMSOAMB
drwxrwxr-x 7 apache apache 4096 Mar 11 21:05 IBMSOAWAS
drwxrwxr-x 7 apache apache 4096 Mar 25 19:33 DCI
drwxrwxr-x 7 apache apache 4096 Apr 29 20:13 DSB
drwxrwxr-x 7 apache apache 4096 May 9 21:37 FareVerify
drwxrwxr-x 2 root kestrel_dev_appsupport 4096 Jun 29 18:10 kestrel-migration
drwxrwxr-x 7 apache apache 4096 Jul 21 20:50 GWY

Now my question is how I make this list in the format or output


1.BSB 2.CIB 3.COB 4.DCI 5.DIB 6.DSB 7.ESB-P 8.ESB-TOOLS 9.FareVerify 10.GCACHE 11.GWY 12. IBMSOAMB 13.IBMSOAWAS 14.ISM 15.KESTREL-DEV 16.kestrel-migration 17.KESTREL-UAPI 18.KESTREL-XD 19.LAMB 20.LinuxAutomation 21.MGLNO 22.PORTAL 23.repos4 24.SCMTools 25.SESTOKEN 26.SMB 27.SOA 28.SPLASH 29.SSB 30.STP 31.TOI

and also If I want to check the codebase of the above repository I want to select it with numbering options like 1 to 31(1....31 the number of repositry)


Thanks in advance
Rohit Sing
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

capturing the time stamp in desired format

Hello All, I am working on korn shell script.i have 2 questions; 1) I have a file and i am able to capture the arrival time. the arrival time is capturing as 11:30 ls -ltr aaa.bbb.332121312.*.* | awk -F" " '{print $8}' 11:30 my desired output is 113000 can anyone please suggest me... (2 Replies)
Discussion started by: pavan_test
2 Replies

2. UNIX for Advanced & Expert Users

get the timestamp of a file in desired format

Hi, I have a file say abc. I get the timestamp in following way: ls -ltr abc | awk -F" " '{print $6,$7,$8}' Mar 8 10:23 I need to get the timestamp as : 03-08-2007 10:23:00 Thanks Sumeet (1 Reply)
Discussion started by: sumeet
1 Replies

3. Shell Programming and Scripting

Help me in getting the desired output

I wanted to put "|" this sign at starting and at end of every field but its not working with first field like Currently the out put is : abc | abc | abc | xyz | xyz | xyz | But I want the out put in this form: | abc | abc | abc | | xyz | xyz | xyz | plz help me. (2 Replies)
Discussion started by: akash
2 Replies

4. HP-UX

Desired Format !

Hi everybody, I just need desired ouput from text file which should have folowing format; "2007-06-25 00:03:32.926+05:30",12354369,"Load","Completed","Rs.-5,556.00",9452217714 "2007-06-25 00:06:57.357+05:30",12354371,"Load","Completed","Rs.-56.00",9415766266 "2007-06-25... (1 Reply)
Discussion started by: prasanth_babu
1 Replies

5. Shell Programming and Scripting

SED - output not desired

echo '0x3f 0xfa ae 0xeA' | sed '/0x/ y/abcdef/ABCDEF/' output: 0x3F 0xFA AE 0xEA echo '0x3f 0xfa ae 0xeA' | sed -r '/0x{2}/ y/abcdefg/ABCDEFG/' output: 0x3F 0xFA AE 0xEA my expected output: 0x3F 0xFA ae 0xEA What I want to achieve is change all hexadecimals to UPPER case(only those... (6 Replies)
Discussion started by: kevintse
6 Replies

6. Shell Programming and Scripting

need to get the desired output

Below is the my cide which is working fine but I am not getting the output indesired format.there is some problem in alignment.Can someone help me to correct this? if ]; then summary=$( echo -e "Please review the log file of auto coloclean utility.\n"; echo -e... (2 Replies)
Discussion started by: anuragpgtgerman
2 Replies

7. UNIX for Dummies Questions & Answers

Help with saving file in desired format

Hi I have the following file in the unix named emp. ID,NAME,SAL,DEPT 101,aaa,2000,10 102,bbb,3000,20 103,ccc,4000,30 104,ddd,5000,40 105,aaa,2000,50 106,bbb,3000,60 107,ccc,4000,70 108,ddd,5000,10 109,aaa,2000,80 I need to save first 3 columns(ID, NAME, SAL) in another file with... (2 Replies)
Discussion started by: alok3141
2 Replies

8. Shell Programming and Scripting

How to grep the desired output and output to a file?

currently I have process from a raw file to this stage ALTER TABLE "EXCEL_ADMIN"."TC_TXN_VOID" ADD CONSTRAINT "PK_TC_TXN_VOID" PRIMARY KEY ("TC_TXN_IID") ALTER TABLE "EXCEL_ADMIN"."TC_TXN_AMT" ADD CONSTRAINT "PK_TC_TXN_AMT" PRIMARY KEY ("TC_TXN_AMT_IID") ALTER TABLE... (10 Replies)
Discussion started by: jediwannabe
10 Replies

9. UNIX for Dummies Questions & Answers

How to print the line from the file in the desired format:?

I am reading a file of Linux ( like mentioned below) & the data is represented in a single line like mentioned below: 11/03 4:00 39992 0.098 5.195 0.034 0.001 1.091 182 0.000 0 0.071 4.252 0.033 0.001 666.53 Now i want to print the result in other file something like this :- 39992... (5 Replies)
Discussion started by: Anamica
5 Replies

10. Shell Programming and Scripting

Desired Date format

I need to get the current year for the files that has been created today. Ex- when i list in unix console it shows ls -l abc.txt -rw-rw-r-- 1 user1 user1 33 May 2 08:58 abc.txt but i need to get as May 2 2013 , i dont need 08:58 is there any command to list it out in that... (7 Replies)
Discussion started by: Prashanth B
7 Replies
apache(1M)                                                System Administration Commands                                                apache(1M)

NAME
apache - Apache hypertext transfer protocol server overview DESCRIPTION
apache consists of a main server daemon, loadable server modules, some additional support utilities, configuration files, and documenta- tion. FILES
The apache HTTPD server is integrated with Solaris. The following files specify the installation locations for apache: /etc/apache Contains server configuration files. A newly-installed server must be manually configured before use. Typically this involves copying httpd.conf-example to the httpd.conf file and making local configuration adjustments. /usr/apache/bin Contains the httpd executable as well as other utility programs. /usr/apache/htdocs Contains the Apache manual in HTML format. This documentation is accessible by way of a link on the server test page that gets installed upon fresh installation. /usr/apache/include Contains the Apache header files, which are needed for building various optional server extensions with apxs(8) /usr/apache/jserv Contains documention for the mod_jserv java servlet module. Documention can be read with a web browser using the url: file:/usr/apache/jserv/docs/index.html /usr/apache/libexec Contains loadable modules (DSOs) supplied with the server. Any modules which are added using apxs(8)are also copied into this directory. /usr/apache/man Contains man pages for the server, utility programs, and mod_perl. Add this directory to your MANPATH to read the Apache man pages. See NOTES. /usr/apache/perl5 Contains the modules and library files used by the mod_perl extension to Apache. /var/apache/cgi-bin Default location for the CGI scripts. This can be changed by altering the httpd.conf file and restarting the server. /var/apache/htdocs Default document root. This can be changed by altering the httpd.conf file and restarting the server. /var/apache/icons Icons used by the server. This normally shouldn't need to be changed. /var/apache/logs Contains server log files. The formats, names, and locations of the files in this directory can be altered by various configuration directives in the httpd.conf file. /var/apache/proxy Directory used to cache pages if the caching feature of mod_proxy is enabled in the httpd.conf file. The location of the cache can also be changed by changing the proxy configuration in the httpd.conf file. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWapchr | +-----------------------------+-----------------------------+ | |SUNWapchu | +-----------------------------+-----------------------------+ | |SUNWapchd | +-----------------------------+-----------------------------+ SEE ALSO
attributes(5) http://www.apache.org NOTES
In addition to the documentation and man pages included with Solaris, more information is available at http://www.apache.org The Apache man pages are provided with the programming modules. To view the manual pages for the Apache modules with the man command, add /usr/apache/man to the MANPATH environment variable. See man(1) for more information. Running catman(1M) on the Apache manual pages is not supported. SunOS 5.10 8 Aug 2000 apache(1M)
All times are GMT -4. The time now is 10:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy