Posts Topics Forums Images
Search videos from message boards Videos Search messages from microblogs Microblogs Search messages from imdb.com Imdb Search messages from yuku.com Yuku Search messages from lefora.com (free forums) Lefora
My account: Login | Sign Up
Loading... 

Unix Shell Scripts | Forum profile

Forum profile page for Unix Shell Scripts on http://www.dbforums.com. This report page is the aggregated overview from a single forum: Unix Shell Scripts, located on the Message Board at http://www.dbforums.com. This forum profile page summarizes the general forum statistics such as: Users Activity, Forum Activity, and Top Authors, which are reported in either a table or graph below for a given reporting time period. Additional forum profile information for "Unix Shell Scripts" on the Message Board at http://www.dbforums.com is also shown in the following ways:

1) Latest Active Threads
2) Hot Threads for Last Week

Warning: These statistics are generated using 'best efforts' and can experience delays and reporting errors at times. Please note that such statistics do not constitute a forum's popularity and/or exact posting volumes at any given reporting period.

Site: dBforums - Database Support Community - Unix Shell Scripts (site profile, domain info dbforums.com)
Title: Unix Shell Scripts
Url: http://www.dbforums.com/unix-shell-scripts/
Users activity: 26 posts per thread
Forum activity: 5 active threads during last week
 

Posting activity on Unix Shell Scripts:

  Week Month 3 Months
Threads: 5 31 55
Post: 12 89 142
 

Unix Shell Scripts Posting activity graph:

Posts by:  day  week  month 

Top authors during last week:

Name
Posts
sco08y
3
user's latest post:
unix loop syntax getting...
Published (2009-11-29 01:31:00)
Quote: Originally Posted by mike_bike_kite The variable SkipInd is not set so I'm unsure why you don't get an error here. Ah, I was wondering about this too. Quoth the man page (works for bash, too): "Field splitting and file name generation are not performed on the words between [[ and ]]." So with an unset variable: Code: $ [ "$NOTDEFINED" == "" ] && echo yes...
MIKELALA
2
user's latest post:
what is the meaning of the...
Published (2009-12-06 10:11:00)
Hi Hans, thanks for your reply. You mean to say that what ever is their between the lines of code <<EOF ...EOF is going to logfile specified. sqlplus -s >> $LOGFILE << EOF -- -- -- EOF you have specified COMMAND ....<< INPUT INPUT so we can use INPUT also ? thanks !!
Tyveleyn
2
user's latest post:
what is the meaning of the...
Published (2009-12-06 20:04:00)
Quote: You mean to say that what ever is their between the lines of code <<EOF ...EOF is going to logfile specified. No, what I meant to say was that the input the sqlplus program expects is put between the <<WHATEVER ... WHATEVER tags. The output of the sqlplus program is redirected to a logfile but unless the sqlplus program can accept it's input through a pipe it's not possible to both redirect input...
LKBrwn_DBA
1
user's latest post:
Get all files by search for a...
Published (2009-11-30 10:24:00)
I recommend you use a standard shell script like ksh or bash: Code: for filenm in /your/directory/* do awk 'substr($0,60,10) ~ /-/ {n+=1} END {print FILENAME" has "n" lines with dashes.";}' $filenm done
RandiR
1
user's latest post:
Get all files by search for a...
Published (2009-11-29 16:51:00)
@Mike Quote: In the above script - can u explain me in steps I added comments in the script. It is a good idea in any case. I also changed the script a bit. Code: # DECLARE VARIABLES. var str list, file, content, line, columns60_69 # Get a list of all files in directory "/your/directory". lf -rn "*" "/your/directory" ($ftype=="f") > $list # $list has file names, one...
AnanthaP
1
user's latest post:
what is the meaning of the...
Published (2009-12-07 01:42:00)
It is as though the contents were coming from a separate file (and so called a "here"file). The same word signifies the start abnd end of the here file. It could as well have been: COMMAND ....<< ANYWORD ANYWORD instead of COMMAND ....<< INPUT INPUT . The end marker for the here file must start at column 1 (annot be indented). End
stolze
1
user's latest post:
what is the meaning of the...
Published (2009-12-06 15:58:00)
Yes, the EOF or INPUT are used to identify where the here-document ends. You can use whichever character sequence you want - as long as the end-marker doesn't occur on a single line within the here-document itself. (It may be part of some other text within the document.) Typically, EOF is used, however.
AnanthaP AnanthaP is offline...
1
user's latest post:
what is the meaning of the...
Published (2009-12-07 01:42:00)
It is as though the contents were coming from a separate file (and so called a "here"file). The same word signifies the start abnd end of the here file. It could as well have been: COMMAND ....<< ANYWORD ANYWORD instead of COMMAND ....<< INPUT INPUT . The end marker for the here file must start at column 1 (annot be indented). End
 

Latest active threads on Unix Shell Scripts::

dBforums - Database Support Community
Started 1 day, 13 hours ago (2009-12-08 03:26:00)  by stolze
You can use "sed": Code: cat inputFile | sed -e 's/(.*)/\1,,,/' > outputFile && mv outputFile inputFile
Thread:  Show this thread (2 posts)   Thread info: Shell script to add 3 commas at the end of each line of a file Size: 417 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: You can use "sed":
Code:

cat inputFile | sed -e 's/(.*)/\1,,,/' > outputFile && mv outputFile inputFile :: Unix Shell Scripts :: dBforums - Database Support Community"
dBforums - Database Support Community
Started 3 days, 10 hours ago (2009-12-06 06:13:00)  by Tyveleyn
Hi, the red text you refer to is called the construction of a 'here-document' in UNIX. It consists of a command where between tags the input is specified on the shell commandline. In general: Code: $ command <<INPUT $ ... $ ... $ INPUT Ofcourse this can also be specified in a shellscript. This makes it possible to redirect the output of the command to a logfile. Regards, ...
Thread:  Show this thread (7 posts)   Thread info: what is the meaning of the following .... Size: 768 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: Hi,

the red text you refer to is called the construction of a 'here-document'
in UNIX. It consists of... :: Unix Shell Scripts :: dBforums - Database Support Community"
dBforums - Database Support Community
Started 3 weeks, 5 days ago (2009-11-13 08:16:00)  by MIKELALA Registered User
Hello Friends, I need to get all file names where in if the file has "-" dash in the columns range from 60 - 69 I mean to say if the file has "-" in the columns from 60 to 69 get that file name. i need either the command or ...may be script its a production issue and i need urgently.. Tried but in vain.. thanks
Thread:  Show this thread (11 posts)   Thread info: Get all files by search for a character "-" in all files from column 60 -
69 Size: 444 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: Get all files by search for a character "-" in all files from column 60 -
69 :: Unix Shell Scripts :: dBforums - Database Support Community"
dBforums - Database Support Community
Started 3 weeks, 3 days ago (2009-11-15 12:53:00)  by mike_bike_kite
Quote: Originally Posted by MIKELALA Appreciate your help in this regard .. There is no indenting of your code so the program is extremely difficult to read. The variable SkipInd is not set so I'm unsure why you don't get an error here. There are no echo's within the loops so it's difficult to see where, why ...
Thread:  Show this thread (5 posts)   Thread info: unix loop syntax getting infinite loop ... Size: 1,417 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: Quote:

	Originally Posted by MIKELALA Appreciate your help in this regard ..

       There is no indenting of your code... :: Unix Shell Scripts :: dBforums - Database Support Community"
dBforums - Database Support Community
Started 3 weeks, 2 days ago (2009-11-16 09:45:00)  by mike_bike_kite
You need to convert the date into a format Unix can use ie strip the dashes. Then output the date using the required format. Code: # your date DATE="2007-11-30" # strip the dashes DATE=`echo $DATE | sed 's/-//g'` # output the new format as YYDDD date -d$DATE '+%y%j' Strictly speaking YYDDD is an ordinal date rather than a Julian date but you could Google the difference....
Thread:  Show this thread (11 posts)   Thread info: Conversion of date to Julian date Size: 707 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: You need to convert the date into a format Unix can use ie strip the
dashes. Then output the... :: Unix Shell Scripts :: dBforums - Database Support Community"
dBforums - Database Support Community
Started 3 weeks ago (2009-11-18 10:22:00)  by kitaman
/etc/conf/cf.d/mtune is a text file containing the minimum default and maximum settings for each tunable parameter. The maximum is the SCO recommended maximum, and can be exceeded for some parameters. /etc/conf/cf.d/stune contains the settings that are different from the default that are in the current configuration. Increasing values generally increases the size of the kernel, though ...
Thread:  Show this thread (6 posts)   Thread info: SCO Openserver 5 Kernel parameters Size: 600 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: /etc/conf/cf.d/mtune is a text file containing the minimum default and
maximum settings for each tunable parameter. The maximum is... :: Unix Shell Scripts :: dBforums - Database Support Community"
dBforums - Database Support Community
Started 2 weeks ago (2009-11-25 05:35:00)  by mike_bike_kite
Quote: Originally Posted by aliyesami I want to be able to construct this variable name inside the script and use it. Have a look at the following code. It sets up a variable called FRED. It then holds that variable's name in another variable called VARIABLE. It then uses eval to get to the original variable which is...
Thread:  Show this thread (3 posts)   Thread info: strange parameter passing issue in KSH Size: 1,152 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: Quote:

	Originally Posted by aliyesami I want to be able to construct this variable name inside the script and... :: Unix Shell Scripts :: dBforums - Database Support Community"
dBforums - Database Support Community
Started 1 month, 1 week ago (2009-10-28 08:56:00)  by mike_bike_kite
This starts you off. It passes your file through a small awk program. You'll need to expand the awk program to do all your fields - alter the 2nd param to be the postion in the line and the 3rd param to be the number of characters to use. In your code the 3rd field is 1 character but your example seems to hold many characters. You might also be able to use the cut with the -c option to get ...
Thread:  Show this thread (12 posts)   Thread info: Separating the Columns based on the ColumnSize Size: 912 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: This starts you off. It passes your file through a small awk program.
You'll need to expand the awk... :: Unix Shell Scripts :: dBforums - Database Support Community"
dBforums - Database Support Community
Started 3 weeks, 5 days ago (2009-11-13 05:07:00)  by mike_bike_kite
Quote: Originally Posted by MIKELALA can anyone help me in getting the output. The following pipes your file through grep which extracts the rows starting with the letters ORA. This is then piped through sed which removes everything from the space onwards. The command to run is the first line, the output follows:...
Thread:  Show this thread (23 posts)   Thread info: extracting a pattern in unix script Size: 1,097 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: Quote:

	Originally Posted by MIKELALA can anyone help me in getting the output.

The following pipes your file through... :: Unix Shell Scripts :: dBforums - Database Support Community"
dBforums - Database Support Community
Started 3 weeks, 2 days ago (2009-11-16 12:49:00)  by mike_bike_kite
is this homework?
Thread:  Show this thread (9 posts)   Thread info: Help in replace method Size: 17 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: is this homework? :: Unix Shell Scripts :: dBforums - Database Support Community"
 

Hot threads for last week on Unix Shell Scripts::

Unix Shell Scripts
Started 3 days, 10 hours ago (2009-12-06 06:13:00)  by Tyveleyn
Hi, the red text you refer to is called the construction of a 'here-document' in UNIX. It consists of a command where between tags the input is specified on the shell commandline. In general: Code: $ command <<INPUT $ ... $ ... $ INPUT Ofcourse this can also be specified in a shellscript. This makes it possible to redirect the output of the command to a logfile. Regards, ...
Thread:  Show this thread (7 posts)   Thread info: what is the meaning of the following .... Size: 768 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: Hi,

the red text you refer to is called the construction of a 'here-document'
in UNIX. It consists of... :: Unix Shell Scripts :: dBforums - Database Support Community"
Unix Shell Scripts
Started 1 day, 13 hours ago (2009-12-08 03:26:00)  by stolze
You can use "sed": Code: cat inputFile | sed -e 's/(.*)/\1,,,/' > outputFile && mv outputFile inputFile
Thread:  Show this thread (2 posts)   Thread info: Shell script to add 3 commas at the end of each line of a file Size: 417 bytes
Related Threads: Same Site | All Sites
Customize:  Customize "RE: You can use "sed":
Code:

cat inputFile | sed -e 's/(.*)/\1,,,/' > outputFile && mv outputFile inputFile :: Unix Shell Scripts :: dBforums - Database Support Community"