12-01-2008
No need to have the quotes in "$#" -ne "1"
if [ ! -d $1 ] here to have the quotes...for $1...
Kindly let me know what is the error u r getting...so that it will be easier to solve...
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
The problem is to : develop a shell script which allow patty and mick( two login names) to execute a program (3 Replies)
Discussion started by: abhishek0216
3 Replies
2. Shell Programming and Scripting
I need help in awk please help immediatly.
This below function is taking lot of time
Please help me to fine tune it so that it runs faster.
The file count is around 3million records
# Process Body
processbody() {
#set -x
while read line
do
... (18 Replies)
Discussion started by: icefish
18 Replies
3. Shell Programming and Scripting
I have to complete my assignment and i need help...
These are two simple shell script programs :
1.) Write a shell script to display files in the current directory in the following format :
FileName Size Date Protection Owner
_______ ____ ___ ________ _____
2.) Write a... (1 Reply)
Discussion started by: harshthegreat89
1 Replies
4. Shell Programming and Scripting
Hi, i;m beginner of Unix, i trying to use crontab to zip my log file automatically, below is my coding, some of the statement i don't know whether is correct or not. Pls help:)
year=`date '+%Y'`
month=`date '+%m'`
day=`date '+%d'`
day=`expr $day - 1`
case $month in
1 | 3 | 5 | 7 | 8 | 9 |... (4 Replies)
Discussion started by: dannyd_y
4 Replies
5. Shell Programming and Scripting
I'm new to this and I need help with writing a script. The following assignment is as follows...
Create a shell script named Project3-8 located in a directory supported by the File System Hierarchy Standard.
The script needs to perform the following pseudocode in the order shown:
-Display... (1 Reply)
Discussion started by: sdpinoy
1 Replies
6. Shell Programming and Scripting
Hi All,
We will be doing a Solaris 8 to Solaris 10 migration migration, just wanted to know if there are any known / common issues arise from this migration from Shell script point of view.
I tried searching this site but mostly post are related to SA's question and jumpstart, etc. If there's... (4 Replies)
Discussion started by: arvindcgi
4 Replies
7. Shell Programming and Scripting
Hi,
There's a shell script by name "download", which has been created as user "mgr" and that script needs to executed as user "dev".
I tried giving privileges 701 on the script download.
But it's throwing the error message
bin]$ ./download
/bin/bash: ./download: Permission denied
... (6 Replies)
Discussion started by: venkatesh17
6 Replies
8. Shell Programming and Scripting
I had try to create a basic shell script. So now im trying to convert in to C-programming language can some one guide/help me out with it?(BTW IM USING A LINUX/UNIX/ORACLE SYSTEM) CODE BELOW
!/bin/bash
for i in `ls -1 /cslab/home/JAZEL/`
do
cp -uv $i /cslab/home/JAZEL/cs295/$i.`date... (2 Replies)
Discussion started by: Nygenesis
2 Replies
9. UNIX for Dummies Questions & Answers
sxsaaas (3 Replies)
Discussion started by: VikrantD
3 Replies
10. Shell Programming and Scripting
My current requirement is to replace xxyxx string with value of date
date1 variable holds a date
and the current script writes html tags to a file as follows
echo date1
nawk 'BEGIN{
FS=","
print "<HTML>""<HEAD>""<p>Hi All,<br><br>There are no cases closed on the xxyxx"
print ... (2 Replies)
Discussion started by: Rajesh A S
2 Replies
LEARN ABOUT NETBSD
script
SCRIPT(1) BSD General Commands Manual SCRIPT(1)
NAME
script -- make typescript of terminal session
SYNOPSIS
script [-adfpqr] [-c command] [file]
DESCRIPTION
script makes a typescript of everything printed on your terminal. It is useful for students who need a hardcopy record of an interactive
session as proof of an assignment, as the typescript file can be printed out later with lpr(1).
If the argument file is given, script saves all dialogue in file. If no file name is given, the typescript is saved in the file typescript.
Option:
-a Append the output to file or typescript, retaining the prior contents.
-c command
Run the named command instead of the shell. Useful for capturing the output of a program that behaves differently when associated
with a tty.
-d When playing back a session with the -p flag, don't sleep between records when playing back a timestamped session.
-f Flush output after each write. This is useful for watching the script output in real time.
-p Play back a session recorded with the -r flag in real time.
-q Be quiet, and don't output started and ended lines.
-r Record a session with input, output, and timestamping.
The script ends when the forked shell exits (a control-D to exit the Bourne shell (sh(1)), and exit, logout or control-d (if ignoreeof is not
set) for the C-shell, csh(1)).
Certain interactive commands, such as vi(1), create garbage in the typescript file. script works best with commands that do not manipulate
the screen, the results are meant to emulate a hardcopy terminal.
ENVIRONMENT
The following environment variable is used by script:
SHELL If the variable SHELL exists, the shell forked by script will be that shell. If SHELL is not set, the Bourne shell is assumed. (Most
shells set this variable automatically).
SEE ALSO
csh(1) (for the history mechanism).
HISTORY
The script command appeared in 3.0BSD.
BUGS
script places everything in the log file, including linefeeds and backspaces. This is not what the naive user expects.
BSD
October 17, 2009 BSD