Sponsored Content
Top Forums Shell Programming and Scripting Help needed executing sh script Post 302471655 by ygemici on Sunday 14th of November 2010 01:17:03 PM
Old 11-14-2010
MySQL

I can try a few test on orginal script and check result is like below except but there are some errors in orginal script and in the script the sox usage in probably false or version differ because --i parameter is not valid in Version 12.18.1 and because of i removed sox command)

Then i modified a little Smilie
can you check that are results are you wanted like ?

Code:
# ./justdoit File_name.cue
0.000000 341,364500 01 - 2
341,364500 640,27000 02 - 3
640,27000 1024,27000 03 - 4
1024,27000 1308,459000 04 - 5
1308,459000 1678,243000 05 - 6
1678,243000 2019,580500 06 - 7
2019,580500 2334,243000 07 - 8
2334,243000 2732,472500 08 - 9
2732,472500 3116,472500 09 - 10
3116,472500 3477,351000 10 - 11
3477,351000 3946,688500 11 - 12
3946,688500 4273,810000 12 - 13

Code:
#! /bin/bash
# ygemici ## justdoit
 
if [ -f labels.txt ] ; then rm labels.txt ; fi
cue_fname="$1"
file_name=$(sed -n '/FILE/s/.*"\(.*\)".*/\1/p' "$cue_fname")
cue_tmp=$(sed -n '/.*:.*:.*/{/.*00:.*/d;s/.* \(.*\)/\1/p}' "$cue_fname" )
frstdrt="0.000000" ; trcknmbr=1;
for line_cue in $cue_tmp
  do
       lstdrt=$(eval echo $(sed 's/\(.*\):\(.*\):\(.*\)/$((\1*60+\2)),$((\3*13500))/' <<<"$line_cue") )
       echo "$frstdrt" "$lstdrt" $(echo $trcknmbr|sed 's/^.$/0&/') "- $((++trcknmbr))" >>labels.txt
       frstdrt="$lstdrt"
  done
more labels.txt

regards
ygemici
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

script not executing

test:/oracle/home $ ex_im1.sh ksh: exp_imp1.sh: not found $echo $SHELL /bin/ksh ex_im1.sh has rwxr--r-- permissions thanks (3 Replies)
Discussion started by: dreams5617
3 Replies

2. Shell Programming and Scripting

script not executing

Hi , Kindly advice whats wrong with this script. It is not executing. ...# #!/bin/ksh find. -name "b.log" if ; then echo "1" fi ...# Thanks (5 Replies)
Discussion started by: himvat
5 Replies

3. Solaris

executing cgi programs in solaris(B89) needed urgent help,pls!

Hi all, I am trying to execute cgi scripts on solaris, but everytime i get a internal server error... The syntax of my .cgi script is correct as ive checked.. Steps i followed 1.started apache 2.The UNIX and Linux Forums - Learn UNIX and Linux from Experts (in opera) 3.places my cgi scripts... (7 Replies)
Discussion started by: wrapster
7 Replies

4. UNIX for Advanced & Expert Users

Executing a shell script from windows;script present in unix

I need to execute a shell script kept in unix machine from windows. User id, password area available. For eg. There's a shell script wich moves all the logs kept in my home directory to a directory named LOGS. Now i need to get this done through windows; either using a batch file, or java... (4 Replies)
Discussion started by: rajneesh_kapoor
4 Replies

5. Shell Programming and Scripting

Variables of executed script available in executing script

Hi, I have a script get_DB_var.ksh which do a data base call and get some variables as below: sqlplus -silent $user/$pass@dbname <<END select col1, col2, col3 from table_name where col4=$1; exit; END Now I want to access all these variables i.e.... (9 Replies)
Discussion started by: dips_ag
9 Replies

6. Shell Programming and Scripting

SCRIPT NOT EXECUTING

HI All, The below shown script whcih is executing wrongly Actually i have three inputs from user FILE NAME :INPUTS CONFRIM FILE NAME :Y or N CONFIRM PATH :/ or . by depending on the user input the script have to execute the find command in the root path or in the home... (3 Replies)
Discussion started by: thelakbe
3 Replies

7. UNIX for Dummies Questions & Answers

Help with executing script

Dear All, I have a script on my USB and I want to execute it on set of files when I connect via ssh on the server ... I'm not able to define the path of the script located in the USB ... how can I use this script without copying/moving it into the directory I'm working on in the ssh mode ....... (6 Replies)
Discussion started by: pawannoel
6 Replies

8. Shell Programming and Scripting

Script not executing

Hi, am facing some problem while inserting a record into a script Please find script below. `sqlplus -s asdf/asdf123 <<eof! set feedback off; set heading off; set verify off; insert into... (3 Replies)
Discussion started by: senkerth
3 Replies

9. UNIX for Dummies Questions & Answers

Script dosent exits after executing the script

Hi i wrote a script which dosent exists after executing any help #!/bin/bash netstat -ptlen | grep 10000 if ; then echo "Hive Thrift server is running" exit 0 else echo "Hive Thrift server is down Trying to Bring up the service" | mail -s "ALERT" team@domain.com `nohup hive... (7 Replies)
Discussion started by: vikatakavi
7 Replies

10. Shell Programming and Scripting

Executing Oracle script from UNIX Script

Hi, I am new to UNIX and want to execute oracle script from unix script. I have written below script but i am getting below error. #!/bin/bash file="/home/usr/control/control_file1" while read line do #$line=@$line #echo $line sqlplus tiger/scott@DB @$line exit #echo "$line" done... (3 Replies)
Discussion started by: vipin kumar rai
3 Replies
set_color(1)							       fish							      set_color(1)

NAME
set_color - set_color - set the terminal color set_color - set the terminal color Synopsis set_color [-v --version] [-h --help] [-b --background COLOR] [COLOR] Description Change the foreground and/or background color of the terminal. COLOR is one of black, red, green, brown, yellow, blue, magenta, purple, cyan, white and normal. o -b, --background Set the background color o -c, --print-colors Prints a list of all valid color names o -h, --help Display help message and exit o -o, --bold Set bold or extra bright mode o -u, --underline Set underlined mode o -v, --version Display version and exit Calling set_color normal will set the terminal color to whatever is the default color of the terminal. Some terminals use the --bold escape sequence to switch to a brighter color set. On such terminals, set_color white will result in a grey font color, while set_color --bold white will result in a white font color. Not all terminal emulators support all these features. This is not a bug in set_color but a missing feature in the terminal emulator. set_color uses the terminfo database to look up how to change terminal colors on whatever terminal is in use. Some systems have old and incomplete terminfo databases, and may lack color information for terminals that support it. Download and install the latest version of ncurses and recompile fish against it in order to fix this issue. Version 1.23.1 Sun Jan 8 2012 set_color(1)
All times are GMT -4. The time now is 07:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy