Search Results

Search: Posts Made By: w020637
808
Posted By w020637
Extract values froma line in file
p.txt
T|DCNT=100|RECCHK=22222.2|PERCHK=32323|#

I want to extract the value of 100 22222.2 and 32323 and assign it to variable
x1,y1,z1

x=`cut -f2 -d "=" p.txt`
x1=`echo $x | cut -f1 -d...
7,167
Posted By w020637
Get the next month end date
how to get the next month end date.

dt=01312014


output=02282014
1,117
Posted By w020637
Simpler next month year program
I have created this program to get the next month and year. Is there a simpler way.

#!/bin/ksh
string=`cat Date.txt`
year=`echo $string | cut -c 1-4`
month=`echo $string | cut -c 5-6`
echo...
3,532
Posted By w020637
The solution works ---------- Post updated...
The solution works

---------- Post updated at 11:57 AM ---------- Previous update was at 11:52 AM ----------


grep M aa.txt > M
grep F aa.txt > F



This will get you what you need
1,650
Posted By w020637
Cannot create a link with the same name
Hi -

Our system admin cannot create a link to NAS with one particular name but he can create with other names.
What might be the cause?

Regards

---------- Post updated at 11:30 AM...
1,464
Posted By w020637
The objective of 2d is to delete the second line...
The objective of 2d is to delete the second line after the first sed deletes all the blank lines at the top. The third sed deletes all lines after it encounters a blank line. The first sed and the...
1,464
Posted By w020637
No error but the results are nt the same. ...
No error but the results are nt the same.

---------- Post updated at 03:59 PM ---------- Previous update was at 03:57 PM ----------

I have been able to combine a few :

cat j| sed 's/^[...
1,464
Posted By w020637
Combine multiple sed
Would like to convert it to one line


sed -i -e '/./,$!d' term1.txt
sed -i '2d' term1.txt
sed -i '/^$/Q' term1.txt
cat term1.txt>> test1.txt


Appreciate if someone could...
2,879
Posted By w020637
Parsing files depending on the content
I am trying to parse files kkapjil kkpcjil kkexjil ...which have autosys job names. The objective is to parse each file...do an autorep -j <job name > -q and write it as output with a line for...
1,587
Posted By w020637
thanks everyone..
thanks everyone..
1,587
Posted By w020637
[Solved] Pattern match and write to separate files
I need to parse a file and depending on a patern match(in the insert job line) separate files have to be created with a line added (content in file2).

Mapping for pattern match and add line :...
2,522
Posted By w020637
perl: search replace in multiple files
When I use special characters the command to replace multiple files with a string pattern does nt work.

---------- Post updated at 12:33 PM ---------- Previous update was at 11:38 AM ----------
...
1,637
Posted By w020637
restrict data from getting written to Logs
$SYBASE/bin/isql -U $DB_USERID -S $DB_SERVER << ! >> $OUTFILE
`echo $DB_PASSWD`
use $db
go
Print " The processing"
go
!
# Extract data to file
echo $DB_PASSWD | $SYBASE/bin/bcp $WRK_DB..open...
7,456
Posted By w020637
Use [ -z "$dest_dir" ] which would...
Use

[ -z "$dest_dir" ]

which would check the existence of the directory.

w020637
2,975
Posted By w020637
step by step
There are many ways one of them..u can pipe it..this is for explanation...instead of awk you can use cut as well


> x=myfile.onlytesting.20090227.txt
> y=`basename $x .txt`
> echo $y...
14,967
Posted By w020637
do a crontab -e to open the crontab file. ...
do a crontab -e

to open the crontab file.

regards

w020637
3,416
Posted By w020637
Another Approach
Another approach is to take all your SQL and have Unix generate it on the fly and spool it to a file (and at that time it does the var substitution).
for $i ...
echo "select sysdate as $i from...
3,416
Posted By w020637
Try this...
One can pass operating system variables to sqlplus using this syntax:
sqlplus username/password @cmdfile.sql var1 var2 var3
Parameter var1 will be mapped to SQL*Plus variable &1, var2 to &2, etc....
1,450
Posted By w020637
Astgen, a b c d e is just a sample as I have...
Astgen,

a b c d e is just a sample as I have specified that the actual strings are different.

I have been able to debug the script. The problem was that the same variable LINE was being used...
11
4,186
Posted By w020637
MisterKhan Crontab is primarily used for...
MisterKhan

Crontab is primarily used for scheduling jobs. If it a simple one liner you can embedd in the crontab but if its a set of tasks then it would be better to put it in a shell script. So...
11
4,186
Posted By w020637
You can create a script dynamically using all the...
You can create a script dynamically using all the parameters you require.

schedule this script in the cron job.

step 1 cron script test.sh in crontab
step 2 create scripts which runs impoting...
1,450
Posted By w020637
Need help with the script
I am trying to write a shell script for the following requirement .
In the directory TEST there are following set of files
a_79cdcd9c8_200809.txt
a_*_200808.txt
a_*_200807.txt
b...
c...
d.......
2,221
Posted By w020637
Thanks joeyg, As I was trying it I came up...
Thanks joeyg,

As I was trying it I came up up with this

year=cat file.txt |tr ' ' =|cut -d= -f3
reporting=cat file.txt |tr ' ' =|cut -d= -f5

Thanks
2,221
Posted By w020637
Read values from a file
Hi ,

I have a file with the following content



I need the read the year and reporting from this file and store them in variables.

I understand that we can read the file delimited...
1,984
Posted By w020637
Hi I have made the chnges to the code and...
Hi

I have made the chnges to the code and its running now. i have added PROCESS1 and PROCESS2 to indicate what files are to be processed under each PROCESS.I have modified the code so as not to...
Showing results 1 to 25 of 45

 
All times are GMT -4. The time now is 12:20 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy