Search Results

Search: Posts Made By: nikki1200
837
Posted By Don Cragun
Your description of your problem is so cryptic...
Your description of your problem is so cryptic that it is hard to guess what you want to do. As a very wild guess you could try something like:
for i in folder/*
do if [ -f "$i" ]
...
9,076
Posted By RudiC
Not sure the OP wants to block anything. I guess...
Not sure the OP wants to block anything. I guess he/she wants to log actions performed. To do so, redirect stderr and not stdout, and append to the log file instead of overwriting. And, you may want...
9,076
Posted By jim mcnamara
This is confusing. Let's say you want to block...
This is confusing. Let's say you want to block access to /path/to/files, then find all the chmod (or created) and modified changes for the last 24 hours.


#Run as root to block other and group...
1,806
Posted By Akshay Hegde
If you keep on editing the input, the answer we...
If you keep on editing the input, the answer we post looks stupid, and other who refer or comes here to answer feel that the solution which we given has no relationship with given input, and answer...
1,806
Posted By pravin27
Hi, Sounds good , It would be great if you...
Hi,

Sounds good , It would be great if you can use "Thanks" button (right side) instead of post to say thanks.

~ Pravin ~
1,806
Posted By Akshay Hegde
awk ' FNR==NR{A[$2 FS $3]=$8;next}($6 FS $7 in...
awk ' FNR==NR{A[$2 FS $3]=$8;next}($6 FS $7 in A){$0 = $0 FS A[$6 FS $7]}A[$6 FS $8]' file1 file2FNR==NR{A[$2 FS $3]=$8;next}
Array A with index $2 FS $3 fields of file1 holds $8 field of file1

...
1,806
Posted By pravin27
awk -F"," 'NR==FNR{a[$2"|"$3]=$9; next} ...
awk -F"," 'NR==FNR{a[$2"|"$3]=$9; next}
a[$6"|"$7]{ print $0 FS a[$6"|"$7]}' file1 file2
1,806
Posted By Akshay Hegde
Red color represents 6th column of inputfile1
Red color represents 6th column of inputfile1
1,806
Posted By Akshay Hegde
Try : $ awk -F, 'FNR==NR{A[$6]=$0;next}($6...
Try :

$ awk -F, 'FNR==NR{A[$6]=$0;next}($6 in A){$0=A[$6] FS $8}A[$6]' inputfile2 inputfile1
20,21,22,23,24,0054,May 5,USA
30,31,32,33,34,0053,May 7 ,PHL

OR
$ awk -F,...
1,138
Posted By pravin27
Perl... perl -F"," -lnae...
Perl...
perl -F"," -lnae '$F[5]=hex($F[5]);print join (",",@F);' filename
1,138
Posted By disedorgue
Hi, In gnu env (sed+bash): $ sed -r...
Hi,
In gnu env (sed+bash):
$ sed -r 's/(([^,]*,){5})([^,]*),/echo \1$[16#\3],/e' nik.csv
1,2,3,4,5,84,May 1
11,12,13,14,15,83,May 2

Regards.
1,138
Posted By Akshay Hegde
Try cat <<eof | awk -F,...
Try

cat <<eof | awk -F, '$6=strtonum("0x"$6)'
1,2,3,4,5,0054,May 1
11,12,13,14,15,0053,May 2
eof

1 2 3 4 5 84 May 1
11 12 13 14 15 83 May 2
for file use like this to keep comma
$ awk...
1,138
Posted By neutronscott
one way: mute@thedoctor:~/temp/nikki1200$...
one way:


mute@thedoctor:~/temp/nikki1200$ ./script
1,2,3,4,5,84,May 1
11,12,13,14,15,83,May 2
mute@thedoctor:~/temp/nikki1200$ cat script
#!/bin/sh

while IFS=, read a b c d e f g; do
...
1,369
Posted By dude2cool
Something like this: cd /test/log && head...
Something like this:

cd /test/log && head -15 <`ls -rt /test/log|tail -1`
8,796
Posted By methyl
Just for interest (using files not Enviroment...
Just for interest (using files not Enviroment Variables":
a="abcdef"
b="ghijkl"
echo "Before"
echo "a=${a}"
echo "b=${b}"
echo "${a}" >a.txt
echo "${b}" >b.txt
a="`cat b.txt`"
b="`cat...
8,796
Posted By balajesuri
Homework? x = x - y y = y + x x = y - x
Homework?

x = x - y
y = y + x
x = y - x
8,796
Posted By clx
One way: $ a=5 $ b=6 $ eval $(echo...
One way:

$ a=5
$ b=6
$ eval $(echo a=$b\;b=$a)
$ echo $a
6
$ echo $b
5
$
11,172
Posted By michaelrozar17
With grep grep -v 'nikki2$' inputfile >...
With grep
grep -v 'nikki2$' inputfile > outfile
11,172
Posted By ahamed101
Try this... sed '/nikki2/d' file1.txt >...
Try this...

sed '/nikki2/d' file1.txt > output_file

#or if your sed supports -i

sed -i '/nikki2/d' file1.txt
You have like ~68 posts, you can't be considered newbie anymore... ;)

--ahamed
8,897
Posted By jayan_jay
$ nawk -F, '{if(NR==1) {print $1}}' infile nik1
$ nawk -F, '{if(NR==1) {print $1}}' infile
nik1
1,606
Posted By ahamed101
Your sed command is missing something towards the...
Your sed command is missing something towards the end. Check the posted again and try.
Where do you want to have your sftp command embedded?
--ahamed
2,080
Posted By Franklin52
Try this: sed 's#.*reason>\(.*\)</reason.*#\1#'...
Try this:
sed 's#.*reason>\(.*\)</reason.*#\1#' file
2,080
Posted By jayan_jay
$ nawk -F"[><]" '{print $7}' infile ...
$ nawk -F"[><]" '{print $7}' infile
response2
2,080
Posted By ahamed101
Code is specificallyt for the input you have...
Code is specificallyt for the input you have specified...
awk -F"<|>" '{for(i=3;i<=NF;i=i+4){print $i}}' inputfile

--ahamed
1,885
Posted By jayan_jay
Try running the code with some shell .. if [...
Try running the code with some shell ..

if [ `sh test1.sh|grep "SUCESS"|wc -l ` -gt 0 ]; then
Showing results 1 to 25 of 40

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