I have to solve some exercises in Korn Shell, but i'm having some problems. For example:
Write a korn shell script with an alfanumeric string as argument. The script lists the file's names in the current directory that contain the given string as substring and that can be read and written.
I can read the string from standard input and also print on screen the file's names which contain the string, but only if use the name of the file as parameter. I can't search the string among all the regular files in my directory and i have no idea on how to filter files basing on permissions. This is my code:
stringhe.rtf is a text file with some random strings created by me.
hello.,
i have 2 files..
1 file is in this folder
/home/test/ssk/DSA.WLG.20050713211544.20050710.20050713211544
(this part)
other file is in this folder
/home/kk/dev/DSA.WLG.20050711210100.20050710.20050711210100
... (1 Reply)
hi all
i am writing the korn shell script.
i have a SQL script which gives me the folowing output
DSA.WLG.20050713211544.20051025.20050713211544 28991 1130198400
DSA.WLG.20050713211544.20051025.20050713211544 25881 1130198400
DSA.WLG.20050711210100.20051025.20050711210100 25881 ... (3 Replies)
I have this Korn shell script that runs via a cron entry. It runs in a loop "watching" a specific file system for files with a certain name. The file system that it is watching is an upload file system for an FTP server. When files that are the correct name come in, it takes the extension of the... (1 Reply)
I am sorry, this is really trivial, yet I am not able to understand what the problem is!
I am using korn shell and running this script
#!/bin/ksh
keep=3
while ; do
echo $keep
keep=$(($keep-1))
done
I am getting this error: `keep=$' unexpected
I am not able to understand it because ... (1 Reply)
Hi,
How can I prompt a user for two input and pass the input to variables in the script. I have the following script but it is not working:
+++++++++Begin+++++++++++
#!/bin/sh
database_c=$1
output_f=$2
echo "Your db is $1\nOutput is $2"
+++++++++End+++++++++++
Thanks,
Leonard (3 Replies)
1. The problem statement, all variables and given/known data:
Write a korn shell script with an alfanumeric string as argument. The script lists the file's names in the current directory that contain the given string as substring and that can be read and written.
2. Relevant commands, code,... (3 Replies)
Please look over my short comings during this line if questions.
I have multiple lines in a file that look like,
phycook 618722 1 76 12:15:13 pts/122 70:24 /4js/runtime2.02.10/lib/fglrun-bin initmenu.42r
phycook 593484 1 65 12:15:18 pts/122 69:22... (3 Replies)
There are 4 parameters that I have to pass from korn shell to sql script.
1) I have to check if $1 , $2 , $3 and $4 are null values or not .
How can I do that ?
2) Once its determined that these values are null (in the sense they are empty) how can I pass null values to sql script... (11 Replies)
Hi All,
Need urgent help with korn shell script, which monitors AIX WPARs Status. Basically WPARs run on a LPAR, So there is a Command "lswpar" which displays WPARs status. This script should be checking the WPARs Status and email support if WPAR is down or broken. General lswpar output is as... (3 Replies)
I am primarily a SQA/Tester and new to korn shell. How can I improve the following script?
#/bin/ksh
SourceLocation=~/Scripts/Test/Source
TrackerLocation=~/Scripts/Test/Tracker
TargetLocation=rdbusse@rdbmbp:/Users/rdbusse/Scripts/Test/Target
for file in $(cd $SourceLocation; ls)
do
... (7 Replies)
Discussion started by: bayouprophet
7 Replies
LEARN ABOUT SUSE
cpanplus::shell
CPANPLUS::Shell(3pm) Perl Programmers Reference Guide CPANPLUS::Shell(3pm)NAME
CPANPLUS::Shell
SYNOPSIS
use CPANPLUS::Shell; # load the shell indicated by your
# config -- defaults to
# CPANPLUS::Shell::Default
use CPANPLUS::Shell qw[Classic] # load CPANPLUS::Shell::Classic;
my $ui = CPANPLUS::Shell->new();
my $name = $ui->which; # Find out what shell you loaded
$ui->shell; # run the ui shell
DESCRIPTION
This module is the generic loading (and base class) for all "CPANPLUS" shells. Through this module you can load any installed "CPANPLUS"
shell.
Just about all the functionality is provided by the shell that you have loaded, and not by this class (which merely functions as a generic
loading class), so please consult the documentation of your shell of choice.
BUG REPORTS
Please report bugs or other issues to <bug-cpanplus@rt.cpan.org<gt>.
AUTHOR
This module by Jos Boumans <kane@cpan.org>.
COPYRIGHT
The CPAN++ interface (of which this module is a part of) is copyright (c) 2001 - 2007, Jos Boumans <kane@cpan.org>. All rights reserved.
This library is free software; you may redistribute and/or modify it under the same terms as Perl itself.
SEE ALSO
CPANPLUS::Shell::Default, CPANPLUS::Shell::Classic, cpanp
perl v5.12.1 2010-04-26 CPANPLUS::Shell(3pm)