Search Results

Search: Posts Made By: jayan_jay
Forum: Red Hat 04-21-2014
2,365
Posted By jayan_jay
What you have tried so far ..
What you have tried so far ..
1,708
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,431
Posted By jayan_jay
Any errors ??
Any errors ??
1,501
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
863
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...
11,744
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,454
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,689
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,035
Posted By jayan_jay
Expecting this .. ?? $ nawk '{$1=$1};...
Expecting this .. ??

$ nawk '{$1=$1}; {sum+=$1}END{print sum}' infile
422.809
2,484
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 ..
804
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,567
Posted By jayan_jay
Oh My God .. I forgot :D
Oh My God .. I forgot :D
2,235
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,567
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,048
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 :...
676
Posted By jayan_jay
Expected output format ??
Expected output format ??
2,235
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,830
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"...
769
Posted By jayan_jay
Use nawk for Solaris machines ..
Use nawk for Solaris machines ..
1,314
Posted By jayan_jay
Similar post :...
Similar post : https://www.unix.com/shell-programming-scripting/180835-sort-each-row-horizontally-awk-any.html
769
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,349
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,082
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,591
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,673
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 05:47 AM.
Unix & Linux Forums Content Copyright 1993-2020. All Rights Reserved.
Privacy Policy