Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: rmoncello
2,454
Posted By rmoncello
Why not just use ls -a
Why not just use ls -a
6,907
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...
6,907
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...
6,907
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,072
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...
1,679
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...
2,908
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
$
15,907
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,351
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...
3,350
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...
6,241
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...
9,027
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...
9,027
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?
9,027
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...
9,027
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 "{}" \;
3,857
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,101
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 ~]$
1,989
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...
4,209
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,101
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,506
Posted By rmoncello
[rick ~]$ x=abcdef12345678 [rick ~]$ l=${#x} ...
[rick ~]$ x=abcdef12345678
[rick ~]$ l=${#x}
[rick ~]$ echo $x | cut -c$(($l - 7))-
12345678
[rick ~]$
16,285
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 ...
8,006
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/
2,900
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...
2,410
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

 

Featured Tech Videos

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