Search Results

Search: Posts Made By: wtolentino
6,411
Posted By Scrutinizer
Hi, try: #!/bin/bash ...
Hi, try:
#!/bin/bash

vFileDir="sample_list.txt"

printf " \n"
#read the content of the file by line
while read vStr1 vStr2
do
echo "vStr1: $vStr1"
echo "vStr2: $vStr2"

...
906
Posted By vgersh99
. ~/.profile
. ~/.profile
3,500
Posted By RudiC
Difficult to tell unless you post the relevant...
Difficult to tell unless you post the relevant part of the script in code tags.
3,500
Posted By RudiC
Et voila: look at line 6: if [[ $# != 0 ]]; then ...
Et voila: look at line 6: if [[ $# != 0 ]]; then This script does NOT accept any parameters!
Comment out that paragraph and try again.
2,296
Posted By DGPickett
Case sensitivity is OK, so 'grep -c' not grep...
Case sensitivity is OK, so 'grep -c' not grep -ic'. The meta characters '[]' escaping the '.' keep it from being counted. LINUX users have 'pgrep -c sfs_load_file.ksh'

Still misses sourced...
2,296
Posted By MadeInGermany
Actually it should return 0 if there are 0...
Actually it should return 0 if there are 0 processes.
Try this one:
ps -eo args | grep -ic "sfs_load_file[.]ksh"
BTW one can supress the ps header:
ps -eo args= | grep -ic "sfs_load_file[.]ksh"
4,874
Posted By Corona688
*.* is a DOS thing, to specify all files in UNIX...
*.* is a DOS thing, to specify all files in UNIX only * is necessary.

That's a useless use of ls * (http://partmaps.org/era/unix/award.html#ls) and useless use of backticks...
11,100
Posted By Peasant
cd $vidr find . ! -name . -prune -type f -name...
cd $vidr
find . ! -name . -prune -type f -name "$vfile" -mtime +$pday
4,275
Posted By malcolmpdx
Grep might differ depending on platform - the...
Grep might differ depending on platform - the systems man pages should help you figure that out. In the page quoted above, it's saying that a return value of 0 means a match was found, a return...
4,275
Posted By Scott
That is a neat trick, thanks :) Better than the...
That is a neat trick, thanks :) Better than the grep -v grep that I would normally use.



Any grep I've ever has these very same return codes (including AIX). They're defined in the standard...
4,275
Posted By verdepollo
The output of ISRUNNING is the count of lines...
The output of ISRUNNING is the count of lines matching the regexp. Which is not the same as the exit code of the grep command itself (you can use $? to test the exit code).
4,275
Posted By malcolmpdx
Since you're not checking the exit status of...
Since you're not checking the exit status of grep, this doesn't apply.

For example, given a file (or a process list, or whatever) containing this

foo
bar
baz


You could see if "baz" was...
4,275
Posted By malcolmpdx
First off, those should be backtics, (i.e. `) for...
First off, those should be backtics, (i.e. `) for the ISRUNNING line.

That code will look at the process table. If it finds any lines containing the name of the script "cca_monthly_load_file.ksh"...
Showing results 1 to 13 of 13

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