Search Results

Search: Posts Made By: happyrain
4,665
Posted By happyrain
awk '{ print $NR }' opp_exep_file.txt > ...
awk '{ print $NR }' opp_exep_file.txt > requests.txt

It gives an output like,

cat requests.txt
[8/13/09
2:00:09
AM]
[Thread0]
as
as
1329211.
ssr
request
4,665
Posted By happyrain
Need to cut a string from a file recursively.
I have a file exep_file.txt with contents similar to,

[8/13/09 2:00:08 AM] [Thread1] xyx request 1329207.
[8/13/09 2:00:09 AM] [116271:RT1329207] sdf sedf sg gds request 1329207.
[8/13/09...
4,570
Posted By happyrain
Hi, I have a variable $c_start=17-JUL-2009...
Hi,

I have a variable $c_start=17-JUL-2009 03:45:59, i need to convert it to
17-07-2009 03:45:59, I saw your example but it works only when using ls,
however I have taken this value out of a...
4,570
Posted By happyrain
It worked. Many thnx. Also I have the...
It worked.
Many thnx.

Also I have the timestamp written in a reporting file as 17-JUL-2009 03:45:59.
Hw to convert it to 17-07-2009 03:45:59, so that I can compare the ls file time stamp with...
4,570
Posted By happyrain
HI CORONA, I tried using -iso and getting...
HI CORONA,

I tried using -iso and getting this,

$ ls -iso FNDOPP*
1041501 16 -rw-r--r-- 1 fgdffdd 14471 Jul 17 03:12 P520738.txt

still I am getting Jul 17.
Could you give an example ?
4,570
Posted By happyrain
Date conversion
Hi all,

When using ls -l I get the details of a filename with the date in the format
Jun 22, is

I need to get it as 22/06, is there any ls command that would do this or is there a way to do...
1,713
Posted By happyrain
Date Manipulation with files
Hi,

I have a timestamp stored in a variable start_time=17-JUL-2009 03:45,
I need to search a file for this time stamp line by line (where each line has a time stamp in the file) if the time stamp...
7,057
Posted By happyrain
How to supply the password in a ping command ?
for i in $var; do
for j in $var; do
if [ ! $i == $j ]
then
ssh -x -a "$host_login_name"@${i} ping -c 3 -s 3 ${j}
if [ $? -eq 0 ]
then
...
1,893
Posted By happyrain
How to compare a string with IP
Hi,

I have a variable with value tmp2=123.45.175.243, I am taking this value from a network file.

In the script I need to check whether the variable has only numerals and .(dot).

if [ $tmp2...
1,499
Posted By happyrain
yep, it works I am able to print the value...
yep, it works

I am able to print the value with

printf "tmp1 = $tmp1\n"

It gives 777.

thnx for the help.
1,499
Posted By happyrain
Need help with the cut command
Hi,

tmp=`stat -c "%a %n" $APPLTMP`
printf "\n$tmp\n"
t1=`echo $tmp | cut -c 1-3`
printf "t1" $t1

tmp has the value 777 /podaai/applcsf/tmp

but t1 returns NULL string,
what needs to be...
12,271
Posted By happyrain
This worked ! tmp="" file_name="tmp.sql" ...
This worked !

tmp=""
file_name="tmp.sql"
printf "$tmp" > $file_name
tmp="select count(*) "Names" from v\$ground where status='Invalid';"
printf "$tmp\n" > $file_name

Thnx for the help Pludi.
12,271
Posted By happyrain
How to write a string with special characters to a file
Hi,

I want to erase the contents of a file and write a sql query into the file.

"" > tmp.txt
"select count\(\*\) \"Names\" from v\$ground where status\=\'Invalid\'\;" > tmp.txt

doesnt...
9,158
Posted By happyrain
It worked, thnx
It worked, thnx
9,158
Posted By happyrain
Using CUT command to get only numerals from a string
I need help to get only the numerals from a string

Ex :

var1=Nightfox has 2 red apple(s)

I need to cut only the numeral 2 and move it to a variable.

var2=`$var1 | cut -c 14`

the cut...
Showing results 1 to 15 of 15

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