10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
my script is some thing like this
i11="{1,2,3,4,5,6,7,8,9,10,11,}"
echo "enter value"
read value ..............suppose i11
x="$value"
echo "$($value)" .............the echo should be {1,2,3,4,5,6,7,8,9,10,11,}
but its showing "i11" only.
plz help me out to get desired... (10 Replies)
Discussion started by: sagar_1986
10 Replies
2. UNIX for Advanced & Expert Users
Hi,
I need to know how to compare the permissions of files which are in two different directories in Unix..
Experts - can any one help on this..!!! (1 Reply)
Discussion started by: yanis
1 Replies
3. Shell Programming and Scripting
hello there,
basically im screwed with a variable that should take the last modification date of a file.
my code is
fileCreationTime=$(( `ls -l $fileName | tr -s " " | cut -d " " -f6` ))
my problem arise coz when the code is executed and stored in a file the return value is 1993 and not... (4 Replies)
Discussion started by: thurft
4 Replies
4. Programming
Hi,
I have written the following Pro*C program to get the difference between 2 dates.But when I am printing the value of the date difference,it is always showing 0.
#include<stdio.h>
#include<sqlca.h>
#include<oraca.h>
void main()
{
EXEC SQL BEGIN DECLARE SECTION;
int diff;
... (4 Replies)
Discussion started by: sureshbabuc
4 Replies
5. Shell Programming and Scripting
Hi All
I have to files
cat a.txt
AAA
BBB
CCC
DDD
and
cat b.txt
AAA
CCC
EEE
i want to compare these two files and o/p should have content of file a.txt which is not in file b.txt
c.txt
BBB
DDD
Please help me (1 Reply)
Discussion started by: aaysa123
1 Replies
6. Shell Programming and Scripting
#!/bin/ksh
var="2009-08-31 12:39:05 UTC"
ddate=`echo $var|cut -d' ' -f1`
y1=`echo $ddate|cut -d'-' -f1`
m1=`echo $ddate|cut -d'-' -f2`
d1=`echo $ddate|cut -d'-' -f3`
filedate=$y1$m1$d1
currdate="20070814"
if ]; then
echo "$LINE -> $filedate LOWER THAN $currdate"
... (0 Replies)
Discussion started by: HemaV
0 Replies
7. Shell Programming and Scripting
Hi,
I have a file which has the date in the last line in the example pasted along with the rates of the countries.
-- I want to compare the date in the last line of the file mentioned in the example below with the system date from Monday to Friday.
-- If system date is equal to the date... (2 Replies)
Discussion started by: Raji_gadam
2 Replies
8. Shell Programming and Scripting
HI,
I would like to know how to compare two files and replace non-matching lines with "_" .
I can get non-mathing lines with
grep -v -f file1 file2
i just want to knw how to display 'file2' with non-matching lines from 'file1' replaced by "_"
for exmaple
file1:
a
b
c
d
... (2 Replies)
Discussion started by: maddy81
2 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
I've to compare the number of records present in a file against its trailer count.
for ex:
rec_cnt=$(awk 'END{print NR}' file.txt)
trl_cnt=$(tail -1 file.txt| cut -c1-6)
problem is trailer is appended with zero's and while comparing it is giving problem.
i.e, rec_cnt=9 and... (1 Reply)
Discussion started by: ganapati
1 Replies
10. Shell Programming and Scripting
Hi,
Please find the attached scriplet and suggest me to fix the bug in this.
-----------------------------------
noofdirs=`ls *.tar | wc -l`
if ; then
let i=1
while ( $i <= $noofdirs ) ;
do
echo $i
mkdir $i
file1=`ls *.tar | head -1`
mv $file1 $i
i =... (2 Replies)
Discussion started by: sharif
2 Replies