Search Results

Search: Posts Made By: jayan_jay
Forum: Red Hat 04-21-2014
3,224
Posted By jayan_jay
What you have tried so far ..
What you have tried so far ..
3,040
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
6,261
Posted By jayan_jay
Any errors ??
Any errors ??
2,179
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
1,294
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...
21,383
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,905
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.
2,357
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,728
Posted By jayan_jay
Expecting this .. ?? $ nawk '{$1=$1};...
Expecting this .. ??

$ nawk '{$1=$1}; {sum+=$1}END{print sum}' infile
422.809
4,013
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 ..
1,119
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...
3,421
Posted By jayan_jay
Oh My God .. I forgot :D
Oh My God .. I forgot :D
5,001
Posted By jayan_jay
Directly executing the displayed output (without...
Directly executing the displayed output (without creating a temporary file and then execute it) ..
3,421
Posted By jayan_jay
Try .. ps -aux | grep mine | nawk...
Try ..

ps -aux | grep mine | nawk '{split($15,b,"/"); print $1,$2,b[7]}'
4,867
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 :...
947
Posted By jayan_jay
Expected output format ??
Expected output format ??
5,001
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
2,383
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"...
1,239
Posted By jayan_jay
Use nawk for Solaris machines ..
Use nawk for Solaris machines ..
2,171
Posted By jayan_jay
Similar post :...
Similar post : https://www.unix.com/shell-programming-scripting/180835-sort-each-row-horizontally-awk-any.html
1,239
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,989
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,664
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}}')
3,121
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...
3,171
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

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