Search Results

Search: Posts Made By: Yoodit
3,036
Posted By Chirel
This will print each line of the file ($0)...
This will print each line of the file ($0) prefixing with the filename justified on 50 char max.
3,036
Posted By Chirel
That's the idea i'm trying to do. prefix...
That's the idea i'm trying to do.

prefix each line of all file with "filename : ", then sort from field 3 to end
then uniq -d on the result ignoring the x chars at the start of lines.
The...
6,830
Posted By itkamaraj
This gives clear picture for your question. ...
This gives clear picture for your question.


$ echo "A:B:C:D:E" | nawk -F: '{print $3}' # uses :(colon) as delimeter
C

$ echo "A:B|C:D:E" | nawk -F: '{print $3}' # uses :(colon) as...
6,830
Posted By itkamaraj
#!/bin/ksh while read filename do find ....
#!/bin/ksh
while read filename
do
find . -type f -name "$filename" | xargs nawk -F"[\"=]" ' /DmidRef RefName/ {print $3}'
done < filenames.txt
6,830
Posted By itkamaraj
replace the . (dot) with the path of the...
replace the . (dot) with the path of the direcotry


find .


. means current directory. it will search the file from the current directory.

so replace . with the directory name which...
2,571
Posted By jim mcnamara
just use sqlplus to create a tab-delimited file...
just use sqlplus to create a tab-delimited file for you. You can send the tab-delimited file directly to users. Excel will convert it. Correctly

set colsep ' '

The "space" between the ' '...
3,653
Posted By aigles
You can do something like that :nawk -F': *' ' ...
You can do something like that :nawk -F': *' '
$1=="Increment By" { Inc = $2; next }
$1=="Max Value" { Max = $2; next }
$1=="Related Table" { Tbl = $2; next }...
3,653
Posted By fpmurphy
Here is solely Korn shell solution: trim() ...
Here is solely Korn shell solution:

trim()
{
trimmed=$1
trimmed=${trimmed%% }
trimmed=${trimmed## }

echo $trimmed
}


IFS=:

while read label value
do
case $label...
3,663
Posted By aigles
Sorry, the alternate version of the function...
Sorry, the alternate version of the function SplitString was written too quickly and untested.
A new version (tested) :
function SplitString(str ,i ,j ,char ,slen ) {
slen = length(str);...
3,663
Posted By aigles
Replace the SplitString function : function...
Replace the SplitString function :
function SplitString(str ,i ,j ,char ,slen ) {
slen = length(str);
for (i=1; i<=slen; i++)
char = substr(str, i, 1);
if (char ~...
3,663
Posted By Corona688
Sets the variable Abbrev_Len inside awk to the...
Sets the variable Abbrev_Len inside awk to the value of $2 in the shell. If $2 is absent, assume 6.
3,663
Posted By aigles
The following script generate all abbrevations...
The following script generate all abbrevations for a string :$ cat gen_abbrev.ksh
#!/usr/bin/ksh

echo "$1" | \
nawk -v Abbrev_Len=${2:-6} '

function SplitString(str ,i ,slen) {
...
4,073
Posted By palanisvr
Try this ...
#capture the script request in a unix host variable from database
v_script_request==`sqlplus -s user/password@dbname <<!
set feedback off heading off pagesize 0
select REQUEST_ACTION from...
Showing results 1 to 13 of 13

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