Search Results

Search: Posts Made By: chetan.c
21,584
Posted By cero
@chetan.c: When you say visible, do you mean in...
@chetan.c: When you say visible, do you mean in ps output or defined in the script?
You can invoke sqlplus without logging in but calling a .sql-commandfile and use the SQL*Plus connect command to...
21,584
Posted By Corona688
Obscuring it isn't much help. You have to be...
Obscuring it isn't much help. You have to be able to retrieve it, and anything you can retrieve, so can anyone else.

Putting it in variables won't help, it'll still be visible in ps.
21,584
Posted By aashish.sharma8
HI , you may define the username and password in...
HI , you may define the username and password in profile and make it restricted.
Then you may use the variables against the username/password.

But I am sure that others on this portal may come...
1,727
Posted By clx
What is your requirement? With trig=`ls...
What is your requirement?
With trig=`ls /home/trig.tch |wc -l`, It will always give 1 if file is there.

Do you want to call the function only if file exists?


EDIT: Similar solution already...
1,727
Posted By Peasant
It is because your trig variable gets defined on...
It is because your trig variable gets defined on start with value.

While loop then executes, but after you delete that file, the variable is still the same inside the script.

Don't use wc -l,...
1,727
Posted By ygemici
"trig" value doesnt change in loop..and processes...
"trig" value doesnt change in loop..and processes goes on.
deleting the trigger file doesnt cause to any change..because of , the trig value is assigned to a value (..wc -l) and not be considered...
1,077
Posted By cfajohnson
Command substitution is almost always the wong...
Command substitution is almost always the wong way to get a list of files. Instead, feed the output of ls to a loop:

ls -c |
while IFS= read -r dir
do
[ -e "$dir/processing" ] && continue...
2,162
Posted By elixir_sinari
Try for i in $(ls -1Frt|grep '/$'|tr -d...
Try

for i in $(ls -1Frt|grep '/$'|tr -d '/$')
do
#### processing with directory i ####
done
18,180
Posted By Corona688
Your program already does use multiple processes...
Your program already does use multiple processes -- the tr happens simultanelusly -- but it's a bit of a waste really, since doing it in that fashion isn't faster than doing it inside awk.

awk is...
18,180
Posted By jim mcnamara
(sem is part of parallel) You may want to limit...
(sem is part of parallel) You may want to limit the number of files running at the same time to avoid eating the system when other users want resources:

for dir in `find /home -type d -name...
18,180
Posted By drl
Hi. Here is a sample use of GNU parallel...
Hi.

Here is a sample use of GNU parallel that counts file contents with wc:
#!/usr/bin/env bash

# @(#) s1 Demonstrate multiple processes simultaneously, with "GNU parallel".

pe() { for...
18,180
Posted By bartus11
Try: for dir in `find /home -type d -name...
Try: for dir in `find /home -type d -name "Folder*"`; do
first $dir &
done
1,749
Posted By Corona688
Sorry, no. gzip doesn't work that way. You...
Sorry, no.

gzip doesn't work that way. You can't really seek inside a gz file, for starters, because you can't use a partial file -- any of the bytes are meaningless without the others. And one...
2,100
Posted By chihung
you can use 'file' to find out. read the man page...
you can use 'file' to find out. read the man page file(1) and magic(5) for more

$ file ace.png
ace.png: PNG image data, 725 x 111, 8-bit/color RGB, non-interlaced

$ mv ace.png ace.tla

$...
5,916
Posted By Corona688
Beyond a certain point you can't improve the...
Beyond a certain point you can't improve the performance of running gzip thousands of separate times to process tiny strings. This might be some improvement since awk is replaced by pure shell...
Showing results 1 to 15 of 15

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