Search Results

Search: Posts Made By: pbillast
2,829
Posted By pbillast
diff file1 file2 | grep '^<'|sed 's/^< //' will...
diff file1 file2 | grep '^<'|sed 's/^< //' will be much faster
3,165
Posted By pbillast
you should be able to write at least part of this...
you should be able to write at least part of this script by yourself by now, don't you think?
Forum: AIX 04-17-2011
64,753
Posted By pbillast
first connect to the server then type passive...
first connect to the server
then type passive and you will be in passive mode
4,942
Posted By pbillast
In these kind of situations you'll find the...
In these kind of situations you'll find the environment variable $! (pid of backgound process) and the manpage for the command wait very useful.
I recently made something to launch sql statements...
3,165
Posted By pbillast
make a file test.awk containing /Name/ { n=$2 }...
make a file test.awk containing
/Name/ { n=$2 }
/Age/ { a=$2 }
/Country/ { { c=$2;printf "%s|%s|%s\n",n,a,c}
}

awk -f test.awk yourfile
->
James|30|Japan
Robin|31|Germany...
7,591
Posted By pbillast
if [ `find ${dir} -type d -prune` ]; then ...
if [ `find ${dir} -type d -prune` ]; then
echo "Directory exist"
else
echo "Directory does not exist"
fi
2,136
Posted By pbillast
grep -w "lkk0lv23" file
grep -w "lkk0lv23" file
1,290
Posted By pbillast
awk 'BEGIN { FS=":*";OFS=":" } { print $1,$2...
awk 'BEGIN { FS=":*";OFS=":" } { print $1,$2 }
1,290
Posted By pbillast
sed 's/\([^:]*\):*\([^*]*\)/\1:\2/'
sed 's/\([^:]*\):*\([^*]*\)/\1:\2/'
Forum: AIX 07-02-2009
5,648
Posted By pbillast
thanks but I was looking for something that traps...
thanks but I was looking for something that traps the events instead of checking via cron
Forum: AIX 07-02-2009
5,648
Posted By pbillast
monitor directory events
I'm am looking for a cheap way to trigger a script when a new file is written in a specific directory. AIX 5.3. It is a production system, so no kernel patching (i.e. inotify).
Filemon and audtiing...
2,355
Posted By pbillast
Thanks, this is the exact answer I was looking...
Thanks, this is the exact answer I was looking for !

---------- Post updated at 07:45 AM ---------- Previous update was at 07:28 AM ----------

I had to do the following to make it work though
...
2,355
Posted By pbillast
cron or terminal ?
Hi all,

I need a way to test from within a script if it is running from cron or from terminal.

The ways I found till now are:

1) test if $PPID corresponds to the cron daemon
2) see if...
Forum: HP-UX 06-20-2009
12,970
Posted By pbillast
as root, true
as root, true
5,475
Posted By pbillast
was this xml transferred from another system?...
was this xml transferred from another system? Your script works for me.
Forum: HP-UX 06-20-2009
12,970
Posted By pbillast
And if it is buried under a layer of subshells...
And if it is buried under a layer of subshells ...
kill -9 `ps -o "%P"`
Forum: HP-UX 06-20-2009
12,970
Posted By pbillast
or put an exit in your script and start your...
or put an exit in your script
and start your shell with
. script.sh
2,801
Posted By pbillast
paste file1 file2| awk '{ printf "%-6s...
paste file1 file2| awk '{ printf "%-6s %-7s\n",$1,$2 }'

paste will merge your files tab separated as durden_tyler said and awk will format the output in lines with 2 strings separated by a space,...
2,801
Posted By pbillast
.... | awk '{ printf "%-6s %-7s\n",$1,$2 }'...
.... | awk '{ printf "%-6s %-7s\n",$1,$2 }' (adjust values according to data)
6,068
Posted By pbillast
find 200906* -type f will be faster since it...
find 200906* -type f
will be faster since it only searches in the right directories
6,378
Posted By pbillast
almost ...
(right about the unneeded g)

sed 's/\<oldtext\>/newtext/g'
(not all sed's support this)

almost does what you want except for the "oldtext-" line, since '-' is a word boundary too
4,066
Posted By pbillast
or echo "'blah blah blah # seew seew'"...
or

echo "'blah blah blah # seew seew'" | sed "s/ *#.*/'/"
6,378
Posted By pbillast
easy
sed 's/^oldtext$/newtext/g' $file
73,700
Posted By pbillast
you can exploit the 0 padding for decimals
printf "%080d"|tr "0" "-"
Showing results 1 to 24 of 24

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