01-18-2016
This is not a homework....
based on the logic i will another script which might have similar..as of now the request is not yet received.....
1. at home i have got bash...in office it is ksh..but it has be ksh complaint since
i will writing it in ksh later one.
2.missed out pointing if there is tie we need to report those as well....
3.the files which i created are used for my calculation to get the end result.....we need to delete them as the script as finished....need to add rm statement at the end of the script.
4.The code which you are referring will create a text file with all the unique item so that we can add similar item in those files and get the result....
note : we might have some other data for which we might have to use specific grep pattern....but since this is sample date or similar data that i will have deal with hence i m preparing for it...
Hope it helps.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I have an issue in writing the shell script to install a webserver on UNIX system. My shell script look something like this.
------------------------------------------------------------
echo "start of the script"
#! /bin/sh
cd /home/path
echo | setup.hp -is:javaconsole -console... (4 Replies)
Discussion started by: vishalm
4 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I created the following shell script file :
bash-3.00$ more Unlock_Statistics1.sh
#!/usr/bin/ksh
ORACLE_SID=prsal02; export ORACLE_SID
NLS_LANG=AMERICAN_AMERICA.AL32UTF8; export NLS_LANG
sqlplus -s /nolog << EOF
connect / as sysdba ;
set serveroutput on size 1000000;
execute... (1 Reply)
Discussion started by: jalpan.pota
1 Replies
3. Shell Programming and Scripting
hi , this script was devloped by somebody whome I dont know way back
# cat run_ucid.sh
#!/bin/csh
# run_ucid.sh
#
# This is a simple shell script that will start an application in
# the background and restart the application if it stops. Upon
# termination an email message is sent and the... (2 Replies)
Discussion started by: viv1
2 Replies
4. Shell Programming and Scripting
Hi Folks,
I am looking for a script where that should show the progress bar while running a process
Ex: while copying a file of size say 2 GB it should start the process as (0 %) and at the end it should show (100%)
Thanks in Advance
Phani. (4 Replies)
Discussion started by: phanivarma
4 Replies
5. UNIX for Dummies Questions & Answers
Hi,
Im writing a shell script:
#!/bin/bash
#Send process which has exceeded 25%
#
echo 'pri pid user nice pcpu command' > /export/home/tjmoore/file2
#
if ps -eo pri,pid,user,nice,pcpu,comm | awk '{if($5 >= 25)print $0}' >> /export/home/tjmoore/file2 2>/dev/null
#
#
#
then... (1 Reply)
Discussion started by: jay02
1 Replies
6. Shell Programming and Scripting
I have a script in TC shell, for some reason its not working.
I'm trying to kick off a script if there are any files in a particular directory "/sample/test3"
Can anyone point out the issue in the same
#!/usr/bin/tcsh
while true
do
if ls /sample/test3 >& /dev/null ; then... (2 Replies)
Discussion started by: gaugeta
2 Replies
7. Shell Programming and Scripting
I found a post from a user requesting help rounding numbers. The script provided by Scrutinizer works fine most of the time but it errors out when trying to round these numbers:
30224939
50872456
20753012
They have in common, a zero in the second digit from left to right. Can someone help... (1 Reply)
Discussion started by: Dennis_Ayala
1 Replies
8. Shell Programming and Scripting
Hi,
I have a file at $HOME/t.txt, below is file content
cat $HOME/t.txt
CUSTOMER_${REGION}.out
Am using this file content in one script $HOME/samp.sh, below is the script
#!/bin/bash
REGION=USA
x=`cat ${HOME}/t.txt`
echo $x
Am getting following output.. CUSTOMER_${REGION}.out
... (3 Replies)
Discussion started by: shieksir
3 Replies
9. Shell Programming and Scripting
Below is my script. However when i run it, i get the below error
./dummy.sh: line 27: syntax error: unexpected end of file
#!/bin/bash
while :
do
read -r INPUT_STRING
case $INPUT_STRING in
test)
echo "Please enter id no : "
read... (4 Replies)
Discussion started by: chandraprakash
4 Replies
10. Shell Programming and Scripting
Hi,
I am beginner in shell scripting. I have written a script to parse file(s) having large number of lines each having multiple comma separated strings.
But it seems like script is very slow. It took more than 30mins to parse a file with size 120MB (523564 lines), below is the script code
... (4 Replies)
Discussion started by: imrandec85
4 Replies
LEARN ABOUT MOJAVE
platform::shell
platform::shell(n) Tcl Bundled Packages platform::shell(n)
__________________________________________________________________________________________________________________________________________________
NAME
platform::shell - System identification support code and utilities
SYNOPSIS
package require platform::shell ?1.1.4?
platform::shell::generic shell
platform::shell::identify shell
platform::shell::platform shell
_________________________________________________________________
DESCRIPTION
The platform::shell package provides several utility commands useful for the identification of the architecture of a specific Tcl shell.
This package allows the identification of the architecture of a specific Tcl shell different from the shell running the package. The only
requirement is that the other shell (identified by its path), is actually executable on the current machine.
While for most platform this means that the architecture of the interrogated shell is identical to the architecture of the running shell
this is not generally true. A counter example are all platforms which have 32 and 64 bit variants and where a 64bit system is able to run
32bit code. For these running and interrogated shell may have different 32/64 bit settings and thus different identifiers.
For applications like a code repository it is important to identify the architecture of the shell which will actually run the installed
packages, versus the architecture of the shell running the repository software.
COMMANDS
platform::shell::identify shell
This command does the same identification as platform::identify, for the specified Tcl shell, in contrast to the running shell.
platform::shell::generic shell
This command does the same identification as platform::generic, for the specified Tcl shell, in contrast to the running shell.
platform::shell::platform shell
This command returns the contents of tcl_platform(platform) for the specified Tcl shell.
KEYWORDS
operating system, cpu architecture, platform, architecture
platform::shell 1.1.4 platform::shell(n)