Search Results

Search: Posts Made By: gvkumar25
4,496
Posted By RudiC
With file1 .. file4 existing in PWD, I ran for...
With file1 .. file4 existing in PWD, I ran
for i in 1 2 3 4 5; do { sleep $i; ls file$i; } & done; jobs; for i in 1 2 3 4 5; do wait %$i; echo $?; done
[1] 7865
[2] 7866
[3] 7867
[4] 7869
[5]...
4,496
Posted By RudiC
wait allows to specify a process ID or a job...
wait allows to specify a process ID or a job specification to wait for. man bash:
1,100
Posted By Scrutinizer
Similar, but with one essential difference. ...
Similar, but with one essential difference.

Note that durden_tyler used double quotes around the variable expansion:
echo "$record"
1,100
Posted By durden_tyler
Assuming "a k shell" = "Korn shell" $ ...
Assuming "a k shell" = "Korn shell"


$
$ cat source_file
Daily|xyz|abc_def_tem_[0-9]\{8,\}|
$
$ cat process_file.sh
#!/usr/bin/ksh
while read -r record
do
echo "$record"
done <<<...
1,186
Posted By Don Cragun
In addition to what RudiC and Scrutinizer have...
In addition to what RudiC and Scrutinizer have already said, why would you write a 28 line Korn shell function using a pipeline of echo and awk to get at awk's printf function when ksh's built-in...
1,186
Posted By Scrutinizer
To help you get on your way, try: echo...
To help you get on your way, try:
echo 'a|b|c|d|e|f' |awk 'BEGIN {FS = "|";column_length[0]=6;column_length[1]=3;column_length[2]=2;column_length[3]=3;column_length[4]=4;column_length[5]=5}...
2,656
Posted By Don Cragun
You might want to try something like the...
You might want to try something like the following:
awk '
BEGIN { FS = OFS = "|"
}
FNR == NR {
hd[$0] = ++hc
next
}
FNR == 1 {
for(i = 1; i <= NF; i++)
if($i in hd)
of[hd[$i]] = i...
2,656
Posted By RudiC
Where does your control file come into play? And,...
Where does your control file come into play? And, wouldn't you agree that it's way better to work on a short but meaningful sample?

---------- Post updated at 12:00 ---------- Previous update was...
5,890
Posted By Chubler_XL
Can I suggest redirect of stderr to stdout like...
Can I suggest redirect of stderr to stdout like this:

ls x 2>&1 | output_log
5,890
Posted By Chubler_XL
There are a number of ways to do this you could...
There are a number of ways to do this you could default to reading input if there are not parameters like this:

$ cat shell_script
#!/usr/bin/ksh

if [ $# -eq 0 ]
then
if [ -t 0 ]
then...
939
Posted By bakunin
Understand that once expansion of the wildcard...
Understand that once expansion of the wildcard has happened it can't be taken back. The shell itself expands the wildcard before it passes what it has expanded the wildcard to to the respective...
939
Posted By Aia
abc\* or 'abc*'
abc\* or 'abc*'
939
Posted By Corona688
Put your variables in double-quotes to suppress...
Put your variables in double-quotes to suppress wildcard expansion and splitting.

echo "$1"
Showing results 1 to 13 of 13

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