Visit The New, Modern Unix Linux Community

Search Results

Search: Posts Made By: jayan_jay
Forum: Red Hat 04-21-2014
2,455
Posted By jayan_jay
What you have tried so far ..
What you have tried so far ..
1,902
Posted By jayan_jay
Your system is not supporting -i option in sed...
Your system is not supporting -i option in sed .. Try with the below then


for i in *.txt ; do printf ",s/^{{PreparerEmail.*}}$/{{PreparerEmail aaa@bbb.com}}\nw\nq\n" | ed $i ; done
3,478
Posted By jayan_jay
Any errors ??
Any errors ??
1,564
Posted By jayan_jay
Expecting this .. for i in hostlist.txt do...
Expecting this ..

for i in hostlist.txt
do
ssh $i "hostname ; df -Ph ; hostname : \$\(df -Ph | wc -l\)" >> /tmp/vvv
done
echo "$(wc -l < /tmp/vvv)" ; cat /tmp/vvv
883
Posted By jayan_jay
Extract the sql part alone.. try the below .. ...
Extract the sql part alone.. try the below ..

while read line
do
error_msg[$index]="$(echo $line)"
index=`expr $index+1`
done <"logs/$ffile"
rows_count=${#error_msg
}
i=0
while [ $i -lt...
12,400
Posted By jayan_jay
Performance not tested .. To avoid arithmetic...
Performance not tested .. To avoid arithmetic calculations, try with egrep

$ egrep "83 (1...$|2000)" infile
83 1453
$
1,469
Posted By jayan_jay
Try executing the script with debugging option by...
Try executing the script with debugging option by adding set -x on the lines top.
1,756
Posted By jayan_jay
Why not while loop .. Expecting this ..?? ...
Why not while loop .. Expecting this ..??

while IFS=, read v1 v2 v3 v4
do
echo "USAGE $0 $v1 $v2 $v3 $v4"
done < infile
1,097
Posted By jayan_jay
Expecting this .. ?? $ nawk '{$1=$1};...
Expecting this .. ??

$ nawk '{$1=$1}; {sum+=$1}END{print sum}' infile
422.809
2,594
Posted By jayan_jay
Include the exit scenario in test.pl perl...
Include the exit scenario in test.pl perl script .. Post the code of it ..
814
Posted By jayan_jay
$ sed "s,..:..-,$(date +%Y)-,g" infile hostname...
$ sed "s,..:..-,$(date +%Y)-,g" infile
hostname 2007-Feb-9 /u100/DEVCO/Patching a.log
hostname 2010-Jun-25 /u100/DEVCO/DumpCleaner a.log
hostname 2011-Jun-25 /u100/DEVCO/DumpCleaner/sample a.log...
2,628
Posted By jayan_jay
Oh My God .. I forgot :D
Oh My God .. I forgot :D
2,274
Posted By jayan_jay
Directly executing the displayed output (without...
Directly executing the displayed output (without creating a temporary file and then execute it) ..
2,628
Posted By jayan_jay
Try .. ps -aux | grep mine | nawk...
Try ..

ps -aux | grep mine | nawk '{split($15,b,"/"); print $1,$2,b[7]}'
1,098
Posted By jayan_jay
What you have tried so far .. ----------...
What you have tried so far ..

---------- Post updated at 04:28 PM ---------- Previous update was at 02:51 PM ----------

@ roro , For your attention :...
690
Posted By jayan_jay
Expected output format ??
Expected output format ??
2,274
Posted By jayan_jay
One way .. (Include the highlighted part once...
One way .. (Include the highlighted part once satisfies with displayed output)

$ find dir_path -name "init*.ora" -type f | awk '{print "echo test123 >> "$0}' | sh
1,858
Posted By jayan_jay
if [ -f "$file_name" ]; then echo File...
if [ -f "$file_name" ]; then
echo File $file_name Found
else
echo File $file_name Not Found
fi


Alternate one ..

$ [ -f "$file_name" ] && echo "Filename $file_name Found"...
801
Posted By jayan_jay
Use nawk for Solaris machines ..
Use nawk for Solaris machines ..
1,401
Posted By jayan_jay
Similar post :...
Similar post : https://www.unix.com/shell-programming-scripting/180835-sort-each-row-horizontally-awk-any.html
801
Posted By jayan_jay
One more way .. (Based on the input given) ...
One more way .. (Based on the input given)

$ nawk '{$1=$1};1' infile | paste -d" " - - - - -
TT0000013101640| HCAMBLAMCNB010|Jul 3 2012 11:14AM| HARYANA| Bangali Mohalla |...
1,381
Posted By jayan_jay
$ paste - - - < infile USER_ID 12/31/69...
$ paste - - - < infile
USER_ID 12/31/69 19:00:00 12/31/69 19:00:00
USER_ID 12/31/69 19:00:00 12/31/69 19:00:00
USER_ID 12/31/69 19:00:00 12/31/69 19:00:00
USER_ID 12/31/69...
2,106
Posted By jayan_jay
Try this for extracting secondary group id .. ...
Try this for extracting secondary group id ..

$ secondary_group=$(id -a | tr ' ' '\n' | nawk -F"[(),=]" '/groups=/ {if($0~/\,/){print $5}else{print $2}}')
1,651
Posted By jayan_jay
Only these 3 strings A756 or B234 or C987 to...
Only these 3 strings A756 or B234 or C987 to check ??? If NO, then on what basis, we can get the values of string from the input file ..

Be clear while providing the input and dont let us...
1,866
Posted By jayan_jay
@amanda, your expected output shows, just a...
@amanda, your expected output shows, just a paragraph printing .. If yes, try the below ..

$ nawk '/ak3/,/ak12/' infile
1 ak3 abc1.0
1 ak4 abc1.0
1 ak5 abc1.1
1 ak6 abc1.1
1 ak7 abc1.1
1 ak8...
Showing results 1 to 25 of 500

 

Featured Tech Videos

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