10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Experts,
path=/db/files/
format=$1
User can enter any file format.compare the user file format with actual file format existed in the directory /db/files. User enter all characters as "A" apart from date format.
example1: user will be entering the file format AAA_AA_YYYYMMDD.AAA
Actual... (6 Replies)
Discussion started by: nalu
6 Replies
2. Shell Programming and Scripting
All,
Objective : Extract the correct format of a file name.
Please share the script command which will extract the correct format of the file after untarring.
Example : If the file is of .csv format then extract filename.csv
if the file is having .CSV then extract the same.CSV
if the file... (1 Reply)
Discussion started by: Mahesh G
1 Replies
3. Shell Programming and Scripting
I have a script that looks like this:
dirname2=/usr/tmp/filelist/*/*
for dirname2 in /tmp/filelist/*/*; do (cd $dirname2/catalog ||echo "file does not exist" && echo "$dirname2" |cut -d '/' -f 7,8 && echo $i && ls -la |awk 'NR>3 {SUM += $5} END { print "Total number of kb " SUM }');done... (2 Replies)
Discussion started by: newbie2010
2 Replies
4. Shell Programming and Scripting
Hi,
I am running two scripts as below.
In Script 1 i am getting correct output in proper HTML format while in script 2 i am not getting output in mail and only html code is getting printed.I want to get the output of script 2.
Please guide.
1.IFILE=/home/home01/Report.csv
if #Checks... (7 Replies)
Discussion started by: Vivekit82
7 Replies
5. Shell Programming and Scripting
Hi! how do i know if the input is the same as the required date format? the date should be dd/mm/YYYY ex. 2/3/2012 or 15/11/2012
all the following conditions must return an error:
*input of string
*day is > 31 or < 1
*month is > 12 or < 1
*year is < 2013
suppose the date format is stored... (1 Reply)
Discussion started by: angilulu
1 Replies
6. Shell Programming and Scripting
I have the date of the file passed into a variable also current date formatted same passed into a separate variable and compare the two with an if statement and statement always comes up false. Even though I verified the dates. Any help would be awesome.
Filecrtdate=`ls -l $i | awk '{print... (19 Replies)
Discussion started by: coderanger
19 Replies
7. Shell Programming and Scripting
hi all
I have a file with many lines like
aa;bb;cc;dd;ee
bb;aa;dd;ee;bb
cc;ee;bb;dd;aa
ee;cc;bb;aa;dd
.
.
.
etc
The first line is in right format,Please help me how to use "SED" to change the rest of the lines to the format like line 1
thank all! (1 Reply)
Discussion started by: yuesko
1 Replies
8. Shell Programming and Scripting
Can somone take a look at this script for me - I'm trying to get it to exit if the format of dateToLookFor is not in the format YYYYMMDD:
function search
{
cd $logsloc
echo "Enter date in format YYYYMMDD (enter to exit):"
read dateToLookFor
echo $dateToLookFor | grep -q ... (2 Replies)
Discussion started by: rich@ardz
2 Replies
9. Shell Programming and Scripting
HI guys,
I have created a script to read 1 column in a csv file and then place it in text file.
However, when i checked out the text file, it is not in a column format...
Example:
CSV file contains
name,age
aa,11
bb,22
cc,33
After using awk to get first column
TXT file... (1 Reply)
Discussion started by: mdap
1 Replies
10. UNIX for Advanced & Expert Users
I'm trying to read the output of a .sql script (simple insert and commit oracle pl/slq script) to a log file using a shell script. My problem is I end up with a log file that looks like this:
sd12@phenix97:/detain/sd12/logs > cat 20071205_detain_20071206.log
12320496 rows created. Commit... (11 Replies)
Discussion started by: sd12
11 Replies