Sponsored Content
Full Discussion: Issue in shell script
Top Forums Shell Programming and Scripting Issue in shell script Post 302964654 by Don Cragun on Sunday 17th of January 2016 05:36:35 PM
Old 01-17-2016
Please answer Scrutinzer's question: Is this homework?

If it isn't there are a few other questions that need to be answered:
  1. What shell are you using?
  2. Note that in your sample data, you have two items that have the same "highest quantity" sold and two other items that have the "highest number of sales transactions". How do you determine which should be given the "highest" label? (Or, more to the point, why don't you report all items with the same statistics when there is a tie?)
  3. You said you wanted your script to print three values. Are all of the files your script creates used for later processing? Or, are they just artifacts left over after your script completes?
  4. Could you please explain why you believe that the following code is needed in your script?:
Code:
	cut -f1 -d ',' log |grep -v item| sort -u >> 1
	for a in `cat 1`
	do
	touch $a
	done

This User Gave Thanks to Don Cragun For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Issue with a shell script

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

Issue with shell Script file

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

Issue with the shell script

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

Help me with following issue using shell script

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

Shell script emailing issue

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

Issue in TC Shell Script

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

Issue with shell script

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

Issue in shell script variables

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

Shell script issue

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

Performance Issue - Shell Script

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
mfontset_modify_entry(3m17n)					 The m17n Library				      mfontset_modify_entry(3m17n)

NAME
mfontset_modify_entry - Modify the contents of a fontset. SYNOPSIS
int mfontset_modify_entry (MFontset * fontset, MSymbol script, MSymbol language, MSymbol charset, MFont * spec, MSymbol layouter_name, int how) DESCRIPTION
Modify the contents of a fontset. The mfontset_modify_entry() function associates, in fontset fontset, a copy of font with the script / language pair or with charset. Each font in a fontset is associated with a particular script/language pair, with a particular charset, or with the symbol Mnil. The fonts that are associated with the same item make a group. If script is not Mnil, it must be a symbol identifying a script. In this case, language is either a symbol identifying a language or Mnil, and font is associated with the script / language pair. If charset is not Mnil, it must be a symbol representing a charset object. In this case, font is associated with that charset. If both script and charset are not Mnil, two copies of font are created. Then one is associated with the script / language pair and the other with that charset. If both script and charset are Mnil, font is associated with Mnil. This kind of fonts are called fallback fonts. The argument how specifies the priority of font. If how is positive, font has the highest priority in the group of fonts that are associated with the same item. If how is negative, font has the lowest priority. If how is zero, font becomes the only available font for the associated item; all the other fonts are removed from the group. If layouter_name is not Mnil, it must be a symbol representing a mdbFLT (font layout table). In that case, if font is selected for drawing an M-text, that font layout table is used to generate a glyph code sequence from a character sequence. RETURN VALUE
If the operation was successful, mfontset_modify_entry() returns 0. Otherwise it returns -1 and assigns an error code to the external variable merror_code. ERRORS
MERROR_SYMBOL COPYRIGHT
Copyright (C) 2001 Information-technology Promotion Agency (IPA) Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST) Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>. Version 1.6.2 12 Jan 2011 mfontset_modify_entry(3m17n)
All times are GMT -4. The time now is 11:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy