Sponsored Content
Full Discussion: ps command in scripts
Top Forums Shell Programming and Scripting ps command in scripts Post 302616223 by Corona688 on Friday 30th of March 2012 04:00:16 PM
Old 03-30-2012
#!/bin/bash should be the very first line. When you make it the second line, it's useless.

The output of ps is different in different versions of UNIX, yes.

Which kind and version of UNIX do you have? -- there are lots, UNIX is just a generic term. If you don't know, uname -a will tell you.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

sqlplus and sh scripts (to_char command))

Hi evrybody!!!! I have a problem with this shell script INICIO=$(sqlplus -s user/user@db1 << END | awk '{printf $1}' set head off set feed off select to_char(min(create_dt) , 'HH24') from table_name where trunc(create_dt)=trunc(sysdate-2); END) I want to recover, in INICIO, the min... (4 Replies)
Discussion started by: josecollantes
4 Replies

2. Shell Programming and Scripting

BUILT-IN command scripts

I am new to Unix scripting. I would like to know if someone can point me to a site which lists any built-in commands in there scripted form. I thought to start with the basics and learn from example. Thanks JSP (2 Replies)
Discussion started by: JSP
2 Replies

3. Shell Programming and Scripting

what's the debug command for perl scripts

Hi, Can you please let me know if there's any debug command for perl scripts like set -x for shell scripts (2 Replies)
Discussion started by: dayanandra
2 Replies

4. UNIX for Dummies Questions & Answers

how to write perl substitute command in shell scripts

How to write perl substitute command in shell script without invoking a perl script file seperately. for ex: shell script to relace IT with CSC in a file using perl substitute command. (3 Replies)
Discussion started by: param_it
3 Replies

5. Shell Programming and Scripting

Invoking 2 scripts in 1 command

HI, I have 2 scripts main.sh and sub.sh, I want to invoke both these scripts in 1 unix command.. Something like... csh -f main.sh(sub.sh TIBCO) sub.sh returns a value as .., by taking this value main.sh prints a text. Can anyone help me to build this command Below are the scripts ////sub.sh... (3 Replies)
Discussion started by: bce_groups
3 Replies

6. Shell Programming and Scripting

Running shell scripts from command

I have written a few shellscripts to run a videogame (starcraft) at different patched versions. For example bw113 runs the 1.13 version of the game. These works perfectly when I run them from command line (./bw113). However I cannot get it to work via mouseclick. Some Information: - I have... (5 Replies)
Discussion started by: lordsloth
5 Replies

7. Shell Programming and Scripting

set only some command & scripts permission to a particular user

hi, i am new in unix.......i am using bash and i want to create a user which has only some command and scripts permission.........is it possible? thanx (1 Reply)
Discussion started by: rakeshtomar82
1 Replies

8. Shell Programming and Scripting

Running Two scripts in a single command line

Hi All, I have two scripts which i want to run in a single command line(or in a single script). And if both the scripts in the main script fail then i want to pass a value to a Application specific utility which will trigger some alert.The value can be anything. Somebody please help.It is... (1 Reply)
Discussion started by: shroh
1 Replies

9. Shell Programming and Scripting

Command need to be used for the scripts output differences

Hi All, Actually we want to know the command need to use if the difference between two files are null, then it should not send as mail. Oterwise it should send as mail alert. Below for your reference, # Email the spoolfile. diff free_sp_new.log free_sp_old.log if output of above... (1 Reply)
Discussion started by: thanvir.akram
1 Replies

10. UNIX for Dummies Questions & Answers

Need equialent command for batch scripts

Hi Friend, what is the equivalent command for batch scripting of tail -1. for example : i have a.txt file with below the contents. i need to print last line --------------------------------- Use descriptive thread titles when posting. For example, do not post questions with subjects like... (3 Replies)
Discussion started by: Jewel
3 Replies
uname(1)						      General Commands Manual							  uname(1)

NAME
uname - Displays information about the operating system SYNOPSIS
uname [-amnrsvp] uname [-S system-name] The uname command displays system information or sets the system name. STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: uname: XCU5.0, SVID 4 Refer to the standards(5) reference page for more information about industry standards and associated tags. OPTIONS
Displays all information specified with the -m, -n, -r, -s, and -v options. Displays the type of hardware running the system. Displays the name of the node (this may be a name that the system is known by to a communications network). [Tru64 UNIX] Displays the processor type of the current host. Displays the release number of the operating system. Displays the name of the implementation of the operating system. (This option is on by default.) [Tru64 UNIX] Changes the name of the system to system_name. The system_name argument is restricted to SYS_NMLN-1 characters. The value of SYS_NMLN is implementation specific and is defined in /usr/include/sys/utsname.h. Only users with appropriate privileges can use this option. Displays the operating system version. OPERANDS
None DESCRIPTION
The uname command writes system information to standard output. This command is used primarily to determine which system you are using. The options cause selected information returned by the uname() call to be displayed. NOTES
When the -a option is used, output is displayed in the order: <system> <node> <release> <version> <hardware> When you request information by specifying the individual options, the appropriate information is displayed in the order indicated. [Tru64 UNIX] If the -p option is used, processor information is appended to the output line. The output of uname may include embedded blank spaces, so you should use caution when passing the output to parsing algorithms. EXIT STATUS
The following exit values are returned: The requested information has been successfully written. An error occurred. EXAMPLES
To display the complete system name and version banner, enter: uname -a ENVIRONMENT VARIABLES
The following environment variables affect the execution of uname: Provides a default value for the internationalization variables that are unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization vari- ables contain an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string value, overrides the values of all the other internationalization variables. Determines the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multibyte characters in arguments). Determines the locale for the for- mat and contents of diagnostic messages written to standard error. Determines the location of message catalogues for the processing of LC_MESSAGES. FILES
System name information header file. Node specific configuration file. SEE ALSO
Functions: uname(2) Standards: standards(5) uname(1)
All times are GMT -4. The time now is 11:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy