Thanks for all the tremendous response ... My apology for not mentioning that the OS is Solaris.
/usr/ucb/ps -auwwwx does the trick although pargs is very helpful too. Unfortunately as some of you had mentioned, the command is OS dependent so while /usr/ucb/ps -auwwwx works in Solaris, it does not on HP-UX ... grrrr ....
I know am asking for some sort of miracle here, but is there an equivalent of the /usr/ucb/ps -auwwwx command that will work across all or most UNIX flavours?
Sample output of the /usr/ucb/ps -auwwwx output as below:
---------- Post updated at 08:45 PM ---------- Previous update was at 08:42 PM ----------
Quote:
Originally Posted by rdcwayx
with root or PID owner.
Hi,
So far, you have the best answer
I know am asking for some sort of miracle here, but is there an equivalent of the /usr/ucb/ps -auwwwx command that will work across all or most UNIX flavours?
There is no variant of the "ps" command which gives the full command arguments (you get as much as the kernel chooses to record) and no syntax which is common across all unix variants.
The nearest you'll get from HP-UX is to invoke the alternative format for "ps" by using "UNIX95= " and ask for the extended arguments list. Note that the space character after the equals sign is important.
For example to show Process ID, User, Extended arguments:
Is there a way I can specify the name of a list as an argument to a shell script and then use the values of that list name in the script?
I need to do this WITHOUT using case statements.
Something like this:
check.sh list1
#!/bin/bash
list1="www.amazon.com www.google.com"... (9 Replies)
Hi Team,
Here's the situation.
I have approximately 300000 to 500000 jpg files in /appl/abcd/work_dir
mv /appl/abcd/work_dir /appl/abcd/process_dir
The above move command will work if the jpg files count is close to 50000 (not sure). If the count is less this mv command holds good. But if... (14 Replies)
Hi All,
I have a question related to Shell scripting. In my shell script, I have following two commands in sequence:
sed 's/^/grep "^120" /g' $ORIGCHARGEDAMTLIST|sed "s;$;| cut -f$FIELD_NO1 -d '|' | awk '{ sum+=\$1} END {printf (\"%0.2f\\\n\", sum/100)}' >$TEMPFILE
mv $TEMPFILE $ORIGFILE... (3 Replies)
Hi,
When I query using ps -ef, the complete command is not displayed and is truncated.
Can you please tell me a method to resolve this ?
I have tried the below.
ps -ef | cat
ps -ef | grep imp >/tmp/t1.txt
/usr/ucb/ps -auxw
pargs <pid>
/usr/ucb/ps -aefyl | grep imp
Thanks (11 Replies)
Dear Friends,
The following script processes a 14508 lines log file.
#!/bin/sh
while read line
do
d=`sed 's/* - * \*\/*\/* *\)\] .*/\1/' | tr '/' ' ' | sed 's/\(*\):\(*\)/\1 \2/'`
y=`date -d "${d}" "+%Y%m%d%H%M%S"`
echo "${y}"
done
While running the above script, I am... (4 Replies)
Hi guys
Following command results in
sed -i 's/#/\\#/g' /home/test/sqlstents*
-bash: /bin/sed: Argument list too long
Please help me solve it.. is there any other way i can do this?.. thanks (4 Replies)
If ($argv == “-debug”) then
Echo “in loop”
Endif
But this is not working. If I modify this code and remove “-“, then it works.
Similarly I am getting problem using grep command also
Grep “-debug” Filename
Can someone please help me on how to resolve these... (1 Reply)
Hi,
I am unable to get the complete date format in ls command.
I need to list file with complete date format in home directory.
If I give 2007/01/01 then i should get all the log files below that particular date.
Pls help me (2 Replies)
Hi ,
I have a piece of code ...wherein I need to assign the following ...
1) A command line argument to a variable
e.g origCount=ARGV
2) A unix command to a variable
e.g result=`wc -l testFile.txt`
in my awk shell script
When I do this :
print "origCount" origCount --> I get the... (0 Replies)
Hello,
I create a file touch 1201093003 fichcomp
and inside a repertory (which hava a lot of files) I want to list all files created before this file :
find *.* \! -maxdepth 1 - newer fichcomp but this command returned bash: /usr/bin/find: Argument list too long
but i make a filter all... (1 Reply)