1
I am using pstree
to watch a sequence of scripts and even when using -pla
, I get shortened versions of arguments and script names. As an example:
sshd,13431
└─bash,13432
└─runJobs.sh,18780 ./runJobs.sh
└─job1.sh,18781 ./job1.sh /path/to/location/of/some/file/that/I/need/to/see/file1.txt /path/to/the/location/of/some/other/file/that/I/need/to/see/file2.txt /path/to/yet/another/location/of/some/other/file/that/I/also/need/to/see/file3.txt/yet/another/long/path/to/a/4th/locatio
└─veryLongNameFor,18782 ./veryLongNameForJob2.sh Argument1_is_very_long arg2_is_also_quite_long The_name_for_arg3_is_even_longer
└─sleep,18783 1000
As you can see verLongNameForJob2.sh
is trimmed, I don't get the full path for /yet/another/long/path/to/a/4th/location/that/I/need/to/lookAt/file4.txt
and I also get /path/to/yet/another/location/of/some/other/file/that/I/also/need/to/see/file3.txt
concatenated with /yet/another/long/path/to/a/4th/location/that/I/need/to/lookAt/file4.txt
. How can I get full script names along with full argument names without concatenation even if they are very long?
Below are the scripts I used for this:
runJobs.sh:
#!/bin/bash
### contents of 'runJobs.sh'
arg1=/path/to/location/of/some/file/that/I/need/to/see/file1.txt
arg2=/path/to/the/location/of/some/other/file/that/I/need/to/see/file2.txt
arg3=/path/to/yet/another/location/of/some/other/file/that/I/also/need/to/see/file3.txt
arg4=/yet/another/long/path/to/a/4th/location/that/I/need/to/lookAt/file4.txt
./job1.sh $arg1 $arg2 $arg3 $arg4
job1.sh:
#!/bin/bash
### contents of job1.sh
arg1=Argument1_is_very_long
arg2=arg2_is_also_quite_long
arg3=The_name_for_arg3_is_even_longer
./veryLongNameForJob2.sh $arg1 $arg2 $arg3
veryLongNameForJob2.sh:
#!/bin/bash
### contents of 'veryLongNameForJob2.sh'
sleep 1000