Sponsored Content
Full Discussion: Please correct my Script
Top Forums Shell Programming and Scripting Please correct my Script Post 302304071 by nuthalapati on Saturday 4th of April 2009 06:08:53 PM
Old 04-04-2009
What could have gone wrong ? this is strange

I use

Linux 2.6.9-22.ELsmp #1 SMP Sat Oct 8 19:11:43 CDT 2005 i686 i686 i386 GNU/Linux
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Please Correct this Array Script

Here is the script. I am not able to increment and Print echo "2=" ${arr} (Bold line) Can someone please help me correct it? I am thinking there is some escape sequence error. Just started learning scripts ... Thanks #!/bin/ksh set -A arr a1 a2 a3 a4 # START Server1=gmi ... (6 Replies)
Discussion started by: psreddy1234
6 Replies

2. Shell Programming and Scripting

Is the script correct ???

Dear Collegues is the below given is correct ? #!/usr/bin/perl $a = @ARGV; while ($a = @ARGV) { exec "./jagan ../dat/ml_in @ARGV"; } Jagan (0 Replies)
Discussion started by: jaganadh
0 Replies

3. Shell Programming and Scripting

something is not write in the script. Can some one please correct this.

Wrong post (2 Replies)
Discussion started by: tuffEnuff
2 Replies

4. Emergency UNIX and Linux Support

Please correct my script

Please correct my script if it any exceptional, since im calling other external script with in my script. #!/bin/bash FE1=TMM DT1=/home/myHome/dated_1 REPORT=/home/otherHome/Report.sh ## Run the report for FE1 & DT1 cd /home/myHome SERV_LST=/home/myHome/srvc-lst echo "Welcome to... (5 Replies)
Discussion started by: raghunsi
5 Replies

5. Shell Programming and Scripting

Please correct the error in the following script

#!/bin/ksh db_user=$DB_USER_NAME db_pwd=$DB_PASSWORD db_sid=$TWO_TASK if ; then echo "\tUsage: MoveUsageProcessing <BC Log file Name>" exit 1 else BCLogFileName=$1 fi grep -i 'MoveUsage daemon needs to run on this account before it can be billed' $1 |awk -F\| '{for(i=0;++i<=NF;) if($i ~... (1 Reply)
Discussion started by: Rajesh Putnala
1 Replies

6. Shell Programming and Scripting

Can anyone correct the error in this script

ret=`sqlplus -s /nolog << EOF connect $db_user/$db_pwd@$db_sid; SPOOL ./$DirectoryName/TableData.txt; set pagesize 0 feedback off verify off heading off echo off linesize 150 while read var_ack_party_name do select * from bus_event where ack_party_name like... (13 Replies)
Discussion started by: rkrish
13 Replies

7. Shell Programming and Scripting

Please Correct My script

############### #filename.sh ############### CUREENT_DATE=02 log_file_path="$CUREENT_DATE"-"${0##%*/}`|cut -d "." -f1|awk -F "/" '{print $NF}'`"".log" echo $log_file_path ################ #output required 02-filename.log (6 Replies)
Discussion started by: mohitmehral
6 Replies

8. Shell Programming and Scripting

Need output of script on screen and file with correct return status of the called script.

Hi, I am trying to capture logs of the script in the file as well as on the screen. I have used exec and tee command for this. While using exec command I am getting the correct output in the file but, script output is not getting displayed on the screen as it get executed. Below is my sample... (14 Replies)
Discussion started by: Prathmesh
14 Replies

9. Shell Programming and Scripting

Can some one correct this script

Hi, I tried writing a script and there was a problem with SFTP part can some one correct where is is the mistake Enveronment file #!/bin/bash export HOST_NAME=<> export USER_NAME=<> export PASSWORD=<> export SOURCE_PATH=/u03/informatica/current/server/infa_shared/TgtFiles/mfg export... (4 Replies)
Discussion started by: spradeep86
4 Replies
SHTOOL-PLATFORM.TMP(1)					      GNU Portable Shell Tool					    SHTOOL-PLATFORM.TMP(1)

NAME
shtool-platform - GNU shtool Unix platform identification SYNOPSIS
shtool platform [-F|--format format] [-S|--sep string] [-C|--conc string] [-L|--lower] [-U|--upper] [-v|--verbose] [-c|--concise] [-n|--newline] [-d|--debug] [-t|--type type] [-n|--newline] [-d|--debug] DESCRIPTION
shtool platform is a flexible Unix platform identification program. It distinguishes a platform according to its hardware architecture and operating system. For both there is a class, product and technology identification. For each of those six identifications, there is a verbose, regular and concise version. This leads to eighteen (2x3x3) available identification strings for each platform, from which usually 2 are chosen in a particular situation. This is done by assembling the platform identification string using a format string containing one or more identification constructs of the forms ""%[xx]"" (verbose), ""%{xx}"" (regular) and ""%<xx>"" (concise). OPTIONS
The following command line options are available. -F, --format format This option controls the output formatting of this program. It is a plain-text string with the ""%"xx" constructs which expand to the various platform information strings. ""%{"xx"}"" is the canonical regular version of the information. ""%["xx"]"" is the verbose version of the information. ""%<"xx">"" is the concise version of the information. In total, the following constructs are available for expansion: %[ac] verbose hardware architecture class %{ac} regular hardware architecture class %<ac> concise hardware architecture class %[ap] verbose hardware architecture product %{ap} regular hardware architecture product %<ap> concise hardware architecture product %[at] verbose hardware architecture technology %{at} regular hardware architecture technology %<at> concise hardware architecture technology %[sc] verbose operating system class %{sc} regular operating system class %<sc> concise operating system class %[sp] verbose operating system product %{sp} regular operating system product %<sp> concise operating system product %[st] verbose operating system technology %{st} regular operating system technology %<st> concise operating system technology The default format string is ""%{sp} (%{ap})"", providing the regular operating system and hardware architecture product information. -S, --sep string This option sets the word separation string for the platform information strings. By default it is "" "" (whitespace). It is especially used for separating the operating system name and the operating system version. -C, --conc string This option sets the word concatenation string for the platform information strings. By default it is ""/"". It is especially used to concatenate multiple parts in operating system name and version parts. -L, --lower This options enforces conversion of the output to all lower case. -U, --upper This options enforces conversion of the output to all upper case. -v, --verbose This option enforces verbose versions of all expansion constructs in format string of option -F. It is equal to specifying all expansion constructs as ""%["xx"]"". -c, --concise This option enforces concise versions of all expansion constructs in format string of option -F. It is equal to specifying all expansion constructs as ""%<"xx">"". -n, --no-newline This option omits the usual trailing newline character in the output. -t, --type type This option is a meta option which internally sets options -F, -S, -C, -L, -U, -v or -c according to TYPE. It can be used to easily specify various commonly known outputs. The following TYPEs are available: binary Binary Package Id (OpenPKG RPM). This is equal to ""-F '%<ap"-%<sp>' -L -S '' -C '+'>" and results in outputs like ""ix86-freebsd4.9"" and ""ix86-debian3.0"". build Build-Time Checking (OpenPKG RPM). This is equal to ""-F '%<at"-%<st>' -L -S '' -C '+'>" and results in outputs like ""i686-freebsd4.9"" and ""i586-linux2.4"". gnu GNU config.guess Style Id. This is similar to build and is equal to ""-F '"%<at"-unknown-%<st>' -L -S '' -C '+'>" and results in outputs like ""i686-unknown-freebsd4.9"" and ""i586-unknown-linux2.4"". web HTTP Server Header Id. This is equal to ""-F '"%<sp"-%<ac>' -S '/' -C '+'>" and results in outputs like ""FreeBSD/4.9-iX86"" and ""Debian/3.0-iX86"". summary Human Readable Verbose Summary Information. This is equal to ""-F 'Class: %[sc] (%[ac]) Product: %[sp] (%[ap]) Technology: %[st] (%[at])' -S ' ' -C '/'"" and results in outputs like: Class: 4.4BSD (iX86) Product: FreeBSD 4.9-RC (iX86) Technology: FreeBSD 4.9-RC (i686) and Class: LSB (iX86) Product: Debian GNU/Linux 3.0 (iX86) Technology: GNU/Linux 2.2/2.4 (i686) all-in-one All-In-One Full-Table Information. This just outputs really all 2x2x3 identification strings as a table. -d, --debug This option enables some internal debugging messages. -V, --version This option outputs the version information of shtool platform only. -h, --help This option outputs the usage information of shtool platform only. EXAMPLE
The following real-life use cases are known: OpenPKG build-time decisions $ platform -c -L -S "" -C "+" -F "%at-%st" $ platform -c -L -S "" -C "+" -F "%ac-%sc" OpenPKG binary RPM packages $ platform -c -L -S "" -C "+" -F "%ap-%sp" README files $ platform -v -F "%sp (%ap)" $ platform -v -F "%sc (%ac)" Debugging $ platform --type=all-in-one SUPPORT
shtool platform currently knows the following particular Unix platforms in detail: FreeBSD, NetBSD, OpenBSD, Linux, Sun Solaris, SCO UnixWare, QNX Neutrino, SGI IRIX, HP HP-UX, HP Tru64, IBM AIX and Apple Mac OS X Darwin. All other Unix platforms are recognized through generic uname(1) information and so usually can be identified sufficiently, although the identification might be not as precise as possible. HISTORY
shtool platform was implemented in September 2003 by Ralf S. Engelschall for use in the OSSP and OpenPKG projects. It was prompted by the need in OpenPKG to have both product (for RPM filenames) and technology (for build-time decisions) identifiers for the Unix platforms, OpenPKG packages are maintained for. It was inspired by the GNU config.guess and the old GNU shtool guessos command. The major difference to GNU config.guess is that shtool platform does not use a vendor identification (cannot be determined most of the time and is not used at all in all projects I've ever seen) and is a lot more flexible (class, product and technology identifications combined with verbose, regular and concise outputs). The drawback of shtool platform is that it (still) knows less particular platforms, although the generic platform identification is sufficient enough most of the time. SEE ALSO
uname(3), GNU config.guess. 18-Jul-2008 shtool 2.0.8 SHTOOL-PLATFORM.TMP(1)
All times are GMT -4. The time now is 07:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy