Search Results

Search: Posts Made By: rmoncello
2,899
Posted By rmoncello
Why not just use ls -a
Why not just use ls -a
16,954
Posted By rmoncello
Hi Scott! I realize you first mentioned...
Hi Scott!

I realize you first mentioned that in #8. I had been typing up #11 while you submitted that. The sleep was introduced by someone else in #2 where they were attempting to use a ps and...
16,954
Posted By rmoncello
The "wait" will halt script execution until the...
The "wait" will halt script execution until the program completes. Just placing it in the background via the "&" will allow the script to continue. The bash "$!" environemt variable will return the...
16,954
Posted By rmoncello
The program may execute much quicker than 2...
The program may execute much quicker than 2 minutes. Also, I see he's using the bash shell.

Try the following:


./program &
pid=$!


This will run the program in the background and then...
6,692
Posted By rmoncello
A couple very common examples of hard links being...
A couple very common examples of hard links being used in an O/S which is not specific to any version:

. is a hard link to the current directory.
.. is a hard link to the parent directory.

In...
2,045
Posted By rmoncello
$ oldname=awk.man $ ls -l $oldname -rw-r--r--...
$ oldname=awk.man
$ ls -l $oldname
-rw-r--r-- 1 rx4521 staff 14737 Jun 16 11:19 awk.man
$ ls -l AAA*
AAA*: No such file or directory
$ mv ${oldname} $(dirname ${oldname})/AAA$(basename...
3,402
Posted By rmoncello
Use ksh: $ foo='1218141 1441 1664 122222' ...
Use ksh:

$ foo='1218141 1441 1664 122222'
$ echo $foo
1218141 1441 1664 122222
$ echo $foo | read a b c d
$ echo $a
1218141
$ echo $b
1441
$ echo $c
1664
$ echo $d
122222
$
18,716
Posted By rmoncello
[UNIX_Help]$ ll input.dat -rw-r--r-- 1 rick...
[UNIX_Help]$ ll input.dat
-rw-r--r-- 1 rick users 114 2009-10-02 14:49 input.dat
[UNIX_Help]$ wc input.dat
3 16 114 input.dat
[UNIX_Help]$ cat input.dat
HEADER
DETAIL This detail record is...
1,601
Posted By rmoncello
[rick@kangaroo ~]$ cat test1.txt ----- ...
[rick@kangaroo ~]$ cat test1.txt
-----
brighton
brighton_gt
hst_brighton
gst_brighton
-------so many files------
---------
[rick@kangaroo ~]$ grep "^brighton" test1.txt
brighton
brighton_gt...
4,119
Posted By rmoncello
Is this what you're looking for? ...
Is this what you're looking for?

[rick@kangaroo ~]$ cat kshtest.ksh
#!/bin/ksh

export $1=$2

eval echo $1 = $(echo \$$1)
[rick@kangaroo ~]$ ./kshtest.ksh var1 houston
var1 = houston...
7,244
Posted By rmoncello
I'm not 100% clear on what you're attempting, but...
I'm not 100% clear on what you're attempting, but I did get the "divide by .1" (which is mathematically the same as multiply by 10) part.

Is this close to what you need?

[rick@kangaroo ~]$ cat...
10,252
Posted By rmoncello
Just ensure that your path is correct. ...
Just ensure that your path is correct.

Instead of


find /path/to/traveldata/data . . .


you should use something like


find ~inbounddata/data . . .


Maybe someone else can...
10,252
Posted By rmoncello
What O/S & Shell are you working on? Can you...
What O/S & Shell are you working on?

Can you post a complete trace of what you're doing, similar to what I did in my previous reply?
10,252
Posted By rmoncello
Try adding the -depth option: [rick data]$...
Try adding the -depth option:

[rick data]$ pwd
/path/to/traveldata/data
[rick data]$ ll
total 12
drwxrwxr-x 2 rick rick 4096 2009-03-11 08:00 2009-03-09
drwxrwxr-x 2 rick rick 4096 2009-03-11...
10,252
Posted By rmoncello
The find is also finding the data folder. You may...
The find is also finding the data folder. You may try something like:


find /path/to/data -type d ! -name data -ctime 0 -exec /bin/rm -Rf "{}" \;
4,576
Posted By rmoncello
CFAJ's given the best response, but as an...
CFAJ's given the best response, but as an exercise here's the answer to the question as you posed it:


[rick@kangaroo ~]$ cat test.sh
#!/bin/bash

testResponseA=3
testResponseB=...
8,794
Posted By rmoncello
[rick@kangaroo ~]$ a=1.3 [rick@kangaroo ~]$...
[rick@kangaroo ~]$ a=1.3
[rick@kangaroo ~]$ b=5.1
[rick@kangaroo ~]$ c=$(echo $a + $b | bc)
[rick@kangaroo ~]$ echo $c
6.4
[rick@kangaroo ~]$
2,325
Posted By rmoncello
Do you need it to be awk/sed? [rick@kangaroo...
Do you need it to be awk/sed?

[rick@kangaroo ~]$ cat test.dat
I00789524 0213 5212
D00789524 0213 5212
I00778787 2154 5412
[rick@kangaroo ~]$ uniq -u -s1 test.dat
I00778787 2154 5412...
5,456
Posted By rmoncello
sqlplus -s user/pwd@DB <<eof spool file1.txt ...
sqlplus -s user/pwd@DB <<eof
spool file1.txt
select col1 from table1;
spool file2.txt
select col2 from table2;
spool file3.txt
select col3 from table3;
:
:
spool file9.txt
select col9 from...
8,794
Posted By rmoncello
[rick ~]$ a=2 [rick ~]$ b=1 [rick ~]$ c=$(($a...
[rick ~]$ a=2
[rick ~]$ b=1
[rick ~]$ c=$(($a + $b))
[rick ~]$ echo $c
3
[rick ~]$
1,642
Posted By rmoncello
[rick ~]$ x=abcdef12345678 [rick ~]$ l=${#x} ...
[rick ~]$ x=abcdef12345678
[rick ~]$ l=${#x}
[rick ~]$ echo $x | cut -c$(($l - 7))-
12345678
[rick ~]$
19,732
Posted By rmoncello
How about going without the grep? Is there a...
How about going without the grep? Is there a specific reason it's needed?

[rx4521 ~]$ last
rx4521 tty7 :0 Thu Feb 26 11:00 still logged in
rick tty2 ...
10,064
Posted By rmoncello
You are using DOS directory sep "\" instead of...
You are using DOS directory sep "\" instead of UNIX directory sep "/".

I'd probably go with:


mv $1/$2 Current/
3,425
Posted By rmoncello
Oops -- didn't read the question well enough...
Oops -- didn't read the question well enough before answering. I'll try again.

Second try:

find . -name backuptime.txt -mtime +7 -prune

if that returns nothing, you've done a backup within...
3,226
Posted By rmoncello
$ cat current.uid user.uid | sort -n | uniq -u ...
$ cat current.uid user.uid | sort -n | uniq -u
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
Showing results 1 to 25 of 27

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