Search Results

Search: Posts Made By: vkumbhakarna
1,934
Posted By hanson44
$ ls -l total 16 $ ls -l -rwxr-xr-x 1...
$ ls -l
total 16

$ ls -l
-rwxr-xr-x 1 372 Apr 19 11:43 test.sh
-rw-rw-r-- 1 58 Apr 19 11:44 xxx
-rw-rw-r-- 1 87 Apr 19 11:44 yyy
-rw-rw-r-- 1 29 Apr 19 11:33 zzz

$ cat test.sh
ls -rt >...
1,934
Posted By RudiC
Your problem is explained quite easily and quite...
Your problem is explained quite easily and quite often in these forums: piped commands are executed in a subshell, variables of which cannot get handed back to the calling shell. You can use temp...
1,808
Posted By hanson44
Yes, as you concluded, a pid is NOT unique within...
Yes, as you concluded, a pid is NOT unique within a 24 hour period. My understanding is they reach a maximum value, go back to lowest open value, and then start increasing again, reusing open slots...
6,252
Posted By Yoda
Please use code tags when posting code fragments...
Please use code tags when posting code fragments or data samples.

Also you did not mention what OS or SHELL you are using!

Here is a KSH code using Indexed Arrays:
#!/bin/ksh

typeset -a...
6,252
Posted By hanson44
Could you use code tags? Thanks
Could you use code tags? Thanks
10,606
Posted By palanisvr
Try this ...
suppose that file content lies in a.txt

fld1=`awk -F'=' '{print $1}' a.txt|tr '\n' ','|sed s/".$"//`
fld2=`awk -F'=' '{print $2}' a.txt|tr '\n' ','|sed s/".$"//`
echo $fld1
echo $fld2
10,606
Posted By Yoda
The code uses a Conditional Expression...
The code uses a Conditional Expression (http://www.gnu.org/software/gawk/manual/html_node/Conditional-Exp.html#Conditional-Exp) to construct variables: f1 & f2 values

If f1 is defined, then append...
71,471
Posted By wizard
The algorithm for allocating process IDs differs...
The algorithm for allocating process IDs differs by type of OS. Some OS types allocate in sequential order up to 32,000 and then start over at the beginning using free slots. Others, namely AIX,...
10,606
Posted By Yoda
awk -F'='...
awk -F'=' '{f1=f1?f1","$1:$1;f2=f2?f2","$2:$2}END{print f1; print f2}' file
Showing results 1 to 9 of 9

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