Sponsored Content
Full Discussion: shell problem
Top Forums Shell Programming and Scripting shell problem Post 302627897 by Franklin52 on Sunday 22nd of April 2012 09:31:20 AM
Old 04-22-2012
The print command:
Code:
BEGIN { level=0; }
{
if (index($0,"{")<1) {
   if ((level==0) && (index($0,"(")>0) && (index($0,")")>0))
	print $0 | cut -d "(" -f1 | cut -d " " -f2;
   if (index($0,"{")>0) level++;
   if (index($0,"}")>0) level--;
   }
}

should be something like:
Code:
BEGIN { level=0; }
{
if (index($0,"{")<1) {
   if ((level==0) && (index($0,"(")>0) && (index($0,")")>0))
        print $0 |"cut -d \"(\" -f1 | cut -d \" \" -f2"
   if (index($0,"{")>0) level++;
   if (index($0,"}")>0) level--;
   }
}

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

shell problem

&& set -x && echo "enter tablespace_end_backup" >&2 Can you tell me what's mean above? thanx (1 Reply)
Discussion started by: Lee
1 Replies

2. UNIX for Dummies Questions & Answers

Shell Problem.

Hello and Good day to all. Im having a problem here and would like to know if there is any solution that could overcome my problem. I have changed from bash to csh (c-shell) yesterday on my Linux 7.2. When i do $echo $SHELL i can see the output /bin/csh which means ihave succesfully landed on... (4 Replies)
Discussion started by: ###1tomato
4 Replies

3. UNIX for Advanced & Expert Users

Shell Problem

Dear Members; I changed ,by mistake ,the root shell in /etc/passwd and logged out. Thereafter, I can no more have a prompt when trynig to log in as root. How to solve this pb ? Regards :confused: (8 Replies)
Discussion started by: oss
8 Replies

4. UNIX for Dummies Questions & Answers

shell problem

What are the different type of shell available in UNIX and how to change the shell? just this 2 question pls help mi (4 Replies)
Discussion started by: yeah016
4 Replies

5. Shell Programming and Scripting

Problem in shell

hi, can any one tell a solution for the following : I want to append 10 spaces and a string say "ok" to 12 digit number which is stored in a varialbe & display using shell script. (1 Reply)
Discussion started by: Sandeep Kale
1 Replies

6. Shell Programming and Scripting

Shell Problem

Hi all, until yesturday grep command was running in KSH .... I was executing this command ls -l | grep *.sh But today its not working at all ... Should I check any of the setting ... I am not getting whats the problem ... I have relogged to unix box but it didn't... (14 Replies)
Discussion started by: dhananjayk
14 Replies

7. Shell Programming and Scripting

problem with if in shell

Hi, My sheel script has below statement: if; then When I run iam getting the below error: -bash: syntax error near unexpected token `then' What is wrong with that statement: Plz help me. (2 Replies)
Discussion started by: pradeep_script
2 Replies

8. Shell Programming and Scripting

shell problem

Hello! Can you please help me on a lab at school: I have to to write a shell program which reads all .C files from the current directory and prints for each file how many '#define' directives it has and for each macro defined how many times is it used in that file. Can you suggest how can i... (1 Reply)
Discussion started by: dark_knight
1 Replies

9. Shell Programming and Scripting

Problem in shell script

hi...i create a script which reads data from file and compare that the data which is entered by me through keyboard...i can easily read first two contents of file..i am facing the problem to read other contents.. structure of my file is username:password:username1:password1.......and so on ... (1 Reply)
Discussion started by: shubhig15
1 Replies

10. UNIX for Dummies Questions & Answers

shell problem

this picture for print You didn't do the question. Go back. if $1 = 0 but until now it give me this message what i should be do ? http://img717.imageshack.us/img717/6137/eeevb.jpg (2 Replies)
Discussion started by: NeeZaaR
2 Replies
XCODEINDEX(1)						    BSD General Commands Manual 					     XCODEINDEX(1)

NAME
xcodeindex -- indexes Xcode projects SYNOPSIS
xcodeindex [-project projectname] [-configuration configurationname] [-quiet] [-destPath path] [-loglevel level] [indexaction ...] xcodeindex -version xcodeindex -help DESCRIPTION
xcodeindex indexes an Xcode project. Usage Run xcodeindex from the directory containing your project (i.e. the directory containing the projectname.xcode package). If you have multiple projects in the this directory you will need to use -project to indicate which project should be indexed. By default, xcodeindex updates the project index if it exists, otherwise it creates a new index. Options -project projectname Index the project specified by projectname. Required if there are multiple project files in the same directory. -configuration configurationname Use the build configuration specified by configurationname when indexing the project. If none is specified, the active configuration is used. -quiet Suppresses all logging while indexing. -destPath path Places the project index in the directory specified by path. -loglevel level Turns on varying degrees of indexing debugging. The level range is from zero to six, enabling a staggered number of the existing index- ing defaults for the indexer. If an option greater than six is used, then the maximum level of logging is enabled. The logging levels are defined as: 0 No logging 1 Prints the name of the file being indexed. This is the default logging level. 2 File processing output 3 Symbol updating output 4 Symbol insertion and creation output 5 Parser basic output 6 Parser error output The levels are inclusive (thus enabling log level 4 would also automatically include levels 1, 2, and 3). Output from higher logging levels than the default (level 1) is not expected to be useful for most developers, but could be valuable in troubleshooting cases where there is a problem with indexing a particular Xcode project. indexaction ... Specify an index action (or actions) to perform on the project. Available build actions are: clean Removes the index for the project. build Updates the index for the project, creating it if necessary. This is the default index action. stats Prints the statistics for the index (number of classes, etc) dump Dumps a tab-delimited format of the index (for major symbols - classes, methods, etc) to stdout -version Displays component version numbers for xcodeindex. These can be compared to the version numbers in the Xcode application's About Xcode window. -help Displays usage information for xcodeindex. EXAMPLES
xcodeindex clean Cleans the index. xcodeindex -project FirstProject -project SecondProject -project ThirdProject -configuration Debug -quiet Indexes three projects using the Debug configuration and suppresses all logging. Mac OS X September 16, 2008 Mac OS X
All times are GMT -4. The time now is 08:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy