Shell program help pls


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Shell program help pls
# 1  
Old 02-18-2010
Shell program help pls

first queestion
Code:
if [ -s $seqfile ]

what does "-s" mean?


second
Code:
seqx -n 10000000 -c 10 < $seqfile >$temp

seqx? -n? -c? what do these mean?

third
Code:
if [ -s $temp ] && ! cmp -s $missing $temp

explain these codes

ty

Last edited by zaxxon; 02-18-2010 at 05:28 AM.. Reason: use code tags, ty
# 2  
Old 02-18-2010
For 1 and 2 use
Code:
man test
man seqx

and look for the options you mentioned. If you don't have man pages available, there are plenty on the web and even in this forum.

For 3:
If file $temp exists and is greater than zero, compare files $missing and $temp silently ie. without much output. There will be filenames and or paths to them stored in those shell variables $missing and $temp.

Generally for obvious things like switches you might consult man pages first.
# 3  
Old 02-18-2010
if [ -s $seqfile ]

-s file ( Non empty file )
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help with first shell script pls.

Hi, I'm trying to extract information from one file to update another one and am a bit stuck. the first file is made up of tags e.g. <item>a@b.com</item> jksdhfjkdsh sldkjfds l klsjdf <item> c@d.com </item> what i'd like to do is extract the email addresses between these tags,... (6 Replies)
Discussion started by: newb1000
6 Replies

2. Shell Programming and Scripting

Error in Shell Script - Can anyone help Pls

Please find my shell script below ------------------------------------- #!/usr/bin/ksh ORAUSER=$1 P_REQUEST_ID=$4 current_time=`date +%m%d%y.%H%M%S` echo "Process started at `date +%m/%d/%y.%H:%M:%S`" #Intialize Variables export SHLIB_PATH=/usr/local/lib ext=".pdf" ps_ext=".ps"... (4 Replies)
Discussion started by: uuuunnnn
4 Replies

3. Shell Programming and Scripting

Shell scripting : pls help me

I have an input file in this format (shown below). I have to select the lines which doesnt followed by 'miR-" and to save such lines into an output file. For easy identification they are shown here in blue color. They have to be selected. Pls. help me to write a shell script to select those lines... (5 Replies)
Discussion started by: hravisankar
5 Replies

4. Shell Programming and Scripting

shell script, pls help

# for i in `cat oo`;do ls -ld $i;done ls: /var/tmp/i: No such file or directory ls: i: No such file or directory ls: /var/tmp/ii: No such file or directory ls: i: No such file or directory ls: /var/tmp/iii: No such file or directory ls: i: No such file or directory ls: /var/tmp/iiii: No such... (2 Replies)
Discussion started by: cpttak
2 Replies

5. Shell Programming and Scripting

Simple program but problem-pls Help

Hi All, I have problem in the following shell script (problem in 2and3 line i guess) #!/bin/sh set value1 = 90; set value2 = 70; if ; then echo "$value1 is normal" else echo "$value2 is abnormal" fi when executed output: $ value_test.sh (Enter) is abnormal Neither it's printing... (13 Replies)
Discussion started by: user__user3110
13 Replies

6. Shell Programming and Scripting

Shell Script Required? Pls. help me

Hi All, I have Information in the file like, ============ Interface Information ==================== +++++++++++++++++ NMInterface ++++++++++++++ ObjID:251c55a2-2257-71dd-0f68-9887a1f10000 NNMObjID:82857 EntityName:aust00m1.mis.amat.com ] Description:ATM9/0/0-atm layer Discovered in... (22 Replies)
Discussion started by: ntgobinath
22 Replies

7. Shell Programming and Scripting

Shell Script Requirements pls

Moderators note: This user has been banned for persistent rule breaking despite being warned that this would be the result. (0 Replies)
Discussion started by: tt1ect
0 Replies

8. Shell Programming and Scripting

HELP PLS!! Shell Scripting!!

Dear All, forgive me as i am a complete beginner in shell scripting in UNIX. I have a file with data similair to the following 8 McDonalds Sandwich 1.99 9 Mcdonalds Fries 1.20 13 McDonalds Milkshake 1.20 7 ... (9 Replies)
Discussion started by: Mary_xxx
9 Replies
Login or Register to Ask a Question