Sponsored Content
Full Discussion: Newbee lost in unix land
Top Forums Shell Programming and Scripting Newbee lost in unix land Post 302194311 by dortoh on Monday 12th of May 2008 04:47:51 PM
Old 05-12-2008
Newbee lost in unix land

I am writing a shell script and I am calling wc -l. I need to assign the results of this call to a varaible and it's not working the way I think it should:

xx= wc -l $1

What am I doing wrong?


Thanx
 

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

newbee - copy data from UNIX to Linux

I have to setup a new server (linux) and I have to copy the data from the old unix system to the new one. Can I access the unix data in dos? Please help. I know little about linux and unix (3 Replies)
Discussion started by: steven5046
3 Replies

2. UNIX for Dummies Questions & Answers

Connection Lost from Unix Server....

This morning I was working by Xwindow to my unix server (hp-ux, 11 version), without any problem but this afteernoon, the connections was refused, and triying to connect using telnet, sometimes I can establish the connection and refuses me in a minute, the error message that appears is "your... (1 Reply)
Discussion started by: fvicente
1 Replies

3. UNIX for Dummies Questions & Answers

Unix Newbee :-)

Hi , i have jus started learning basics of unix .I have few queries : 1) what is meant by unix box server? 2) what is the difference between unix and linux (is it jus x-windows graphical system or is there anything more than that?) 3) Can i get any free download of unix so that i cud... (7 Replies)
Discussion started by: vivekshankar
7 Replies

4. HP-UX

Lost both Unix Admin's ....need help

Hi all, I know nothing about unix. Both of our unix guys left for greener pastures. I have been given the task of tring to get 10,000 accounts on a hp ux system into active directory. The accounts don't need to be moved, but they need to be in active directory for a couple of applications. Even if... (0 Replies)
Discussion started by: Bob D
0 Replies

5. Virtualization and Cloud Computing

No Brave Bot Hunters in CEP Land?

Tim Bass 12-18-2008 03:43 AM In August of this year, we issued the challenge,* The Bot Hunter: An Event Processing Challenge (Bot or Not). Not surprisingly, none of the “self-described CEP vendors” with grand claims of CEP greatness, responded.* Real-time detection of threats and opportunities,... (0 Replies)
Discussion started by: Linux Bot
0 Replies

6. Shell Programming and Scripting

Help needed - Newbee here

I am very new to shell scripting. please help me in this scenario. when we run the script, It should ask user to enter the input (for example, ticket number like below) B1234567 B2345678 C1245782 . 2. Once user enter the input or,paste the input, the script should check each and every... (1 Reply)
Discussion started by: Padmanabhan
1 Replies
exit(1)                                                            User Commands                                                           exit(1)

NAME
exit, return, goto - shell built-in functions to enable the execution of the shell to advance beyond its sequence of steps SYNOPSIS
sh exit [n] return [n] csh exit [ ( expr )] goto label ksh *exit [n] *return [n] DESCRIPTION
sh exit will cause the calling shell or shell script to exit with the exit status specified by n. If n is omitted the exit status is that of the last command executed (an EOF will also cause the shell to exit.) return causes a function to exit with the return value specified by n. If n is omitted, the return status is that of the last command exe- cuted. csh exit will cause the calling shell or shell script to exit, either with the value of the status variable or with the value specified by the expression expr. The goto built-in uses a specified label as a search string amongst commands. The shell rewinds its input as much as possible and searches for a line of the form label: possibly preceded by space or tab characters. Execution continues after the indicated line. It is an error to jump to a label that occurs between a while or for built-in command and its corresponding end. ksh exit will cause the calling shell or shell script to exit with the exit status specified by n. The value will be the least significant 8 bits of the specified status. If n is omitted then the exit status is that of the last command executed. When exit occurs when executing a trap, the last command refers to the command that executed before the trap was invoked. An end-of-file will also cause the shell to exit except for a shell which has the ignoreeof option (See set below) turned on. return causes a shell function or '.' script to return to the invoking script with the return status specified by n. The value will be the least significant 8 bits of the specified status. If n is omitted then the return status is that of the last command executed. If return is invoked while not in a function or a '.' script, then it is the same as an exit. On this man page, ksh(1) commands that are preceded by one or two * (asterisks) are treated specially in the following ways: 1. Variable assignment lists preceding the command remain in effect when the command completes. 2. I/O redirections are processed after variable assignments. 3. Errors cause a script that contains them to abort. 4. Words, following a command preceded by ** that are in the format of a variable assignment, are expanded with the same rules as a vari- able assignment. This means that tilde substitution is performed after the = sign and word splitting and file name generation are not performed. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
break(1), csh(1), ksh(1), sh(1), attributes(5) SunOS 5.10 15 Apr 1994 exit(1)
All times are GMT -4. The time now is 01:41 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy