Search Results

Search: Posts Made By: aster007
3,208
Posted By aster007
awk help to mask characters
Hi Guys, I'm not an expert so seeking advice on awk.
I need to mask numbers in a text field so that they show up as "*" except for the last 4.
Input:
Desired Output:

The part of the Code I...
9,728
Posted By aster007
bakunin (https://www.unix.com/members/41441.html)...
bakunin (https://www.unix.com/members/41441.html) - That is the excat change I am trying to avoid as it involves many script changes.
Our scripts have something like
Options -a Call All
-e Call...
9,728
Posted By aster007
AIX to Linux command difference
Moving from AIX 6.1 to RHEL 6.6, I have noticed a few command differences.
One that has been causing issue is a simple echo command when I have to use it this way -> "echo -e"
On the AIX it...
10,095
Posted By aster007
Got it resolved....updated the last peice of code...
Got it resolved....updated the last peice of code to remove boundary and just have the "echo" as below

cat $ATTACH
echo '---asdfghjkl'
echo "Content-Type: text/html charset=US-ASCII;"
echo...
10,095
Posted By aster007
Got the extra box removed by updating the HTML...
Got the extra box removed by updating the HTML code

END{
printf "</TABLE>"
printf "<BR>"instead of

END{
printf "<TR><TD></TD></TR></TABLE>"
...
10,095
Posted By aster007
Actual HTML file cat test_file.html ...
Actual HTML file
cat test_file.html
<BR><BR><FONT SIZE=4><CENTER><B>XXXXX</B></CENTER></FONT><BR><HTML><HEAD><TITLE> Title Header </TITLE></HEAD><BODY><TABLE border = 4 BORDERCOLOR =BLACK...
10,095
Posted By aster007
Sendmail with HTML body and attachment code issues
Hi,

I was working on getting an HTML file in the mail body along with attaching a "csv" file to the mail.
Below are the 2 parts of the code.

I need help with the second part where I'm sending...
1,602
Posted By aster007
I didn't quite understand your requirements but...
I didn't quite understand your requirements but if you have an input file with data, each line can be appended in the below way

while read LINE
do
TODAY=`date "+%d%b%Y"`

echo...
4,792
Posted By aster007
Not the best solution...but should work ...
Not the best solution...but should work
Considering file as your input file


i=1

while read LINE
do
END_OF_FILE=`echo $LINE | awk -F "|" '{print $1}'`

if [[ $END_OF_FILE !=...
5,140
Posted By aster007
cat file1 | awk '{print $1}' | while read NUM ...
cat file1 | awk '{print $1}' | while read NUM
do
# echo ${NUM}

grep "Gene_${NUM}" file2 2>/dev/null # output to tty or suppress

RC=$?

if [[ ${RC} == 0 ]]...
1,487
Posted By aster007
small details!! :( there was a "\" in the...
small details!! :( there was a "\" in the grep....must have been escaping the quote!

cat $FILE_NAME | grep "C:" | awk '{print $2}' > absolute_paths.dat
1,487
Posted By aster007
corrected the cp statement. Also, use this for...
corrected the cp statement.
Also, use this for getting the second part


cat $FILE_NAME | grep "C:\" | awk '{print $2}' > absolute_paths.dat
1,487
Posted By aster007
Can you show how your txt look like? I wanted...
Can you show how your txt look like?
I wanted to know if the "C:\blabla\more blahblah\myfile.txt" is on separate line or on same line with other words, etc.

considering they are on separate...
1,086
Posted By aster007
Used cut instead of awk. Not sure why "awk"...
Used cut instead of awk. Not sure why "awk" doesn't list the first one.
Maybe someone with superiour UNIX knowledge can help here.

ls /dev/sd[b-z] | cut -f3 -d "/" | awk '{print "some text" $1...
9,165
Posted By aster007
Use a "\" to escape its normal behavior of...
Use a "\" to escape its normal behavior of pointing to the start of the line/word.

nocarrot=`echo $var | sed -e 's/\^/_/g'`
4,198
Posted By aster007
cat gold.txt | while read FILE_NME do ...
cat gold.txt | while read FILE_NME
do
FL_NME_PATH=`find / -type f -name "$FILE_NME" `

cp $FILE_NME_PATH /path/directory/
done
2,291
Posted By aster007
Use backslash to escape the quotes you need to be...
Use backslash to escape the quotes you need to be present in your output


echo "user_pref(\"network.proxy.http\", \"$j\");"
3,033
Posted By aster007
Thanks in2nix4life...
Thanks in2nix4life (https://www.unix.com/members/302031849.html)!
But why does having 13 in mtime giving the correct output, when its 14 days past the file creation.
4,423
Posted By aster007
From the code, you are trying to run the command...
From the code, you are trying to run the command for "lastWord" on the local machine and then trying to copy the file from the remote machine which is not present there. The file you have generated...
3,033
Posted By aster007
Behaviour of "find" command
Hi,

I'm trying to understand why the find command below is not listing a directory which was modified long back from the number of days specified in the mtime part. :confused:


user-aster...
1,363
Posted By aster007
Still not clear....can you paste the output you...
Still not clear....can you paste the output you want please.
32,363
Posted By aster007
file=<filename with timestamp> while read...
file=<filename with timestamp>

while read LINE
do
echo "$file $LINE" >> temp_file.txt

done < input_file

temp_file.txt > input_file



As Corona688 has said, we will only get...
1,363
Posted By aster007
you can use the "grep -B" option if I understood...
you can use the "grep -B" option if I understood you right.
15,109
Posted By aster007
you will need to save the hostkey file first. ...
you will need to save the hostkey file first.
First do a simple "ssh <servername>"
it will ask you the above question you posted to save the file - type in "save"/"yes" whatever it asks.
Once you...
3,130
Posted By aster007
cat <file> | cut -f1 -d":"
cat <file> | cut -f1 -d":"
Showing results 1 to 25 of 53

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