Search Results

Search: Posts Made By: sysrenan
8,119
Posted By sysrenan
Great everyone! radoulov, this worked fine...
Great everyone!

radoulov, this worked fine to clean out the lines as from what I see now :D
awk 'NF { r = r ? r $0 : $0 }
/:END:/ { print r; r = x }' infile

Thanks everyone for the support, I...
12,817
Posted By sysrenan
I usually search inside a file with: cd...
I usually search inside a file with:
cd /home/users/; grep -R "keyword" * | gawk -F: '{ print $1 }' >> output.txt
This will output the path of the found files to output.txt

Play around with that...
51,178
Posted By sysrenan
Hey, I don't have a Solaris system to test my...
Hey, I don't have a Solaris system to test my script sorry, I usually run RedHat OS.

But, you can try looking at:
sed --help
the purpose of this script was to not use temporary file so it will...
8,119
Posted By sysrenan
nice steadyonabix, your sed worked somehow, but...
nice steadyonabix, your sed worked somehow, but we're almost there, I've noticed that some lines are like:


:@:6:@:1:@:Shortcut:@:shortcut.s:@:Leve o carr:@:Você terá que construir uma pista....
8,119
Posted By sysrenan
ghostdog74, you script worked great for that...
ghostdog74, you script worked great for that little file above, but when I run awk in my file wich now how about 10K lines I get an error:

awk: (FILENAME=to-organize.txt FNR=3397) fatal: not...
8,119
Posted By sysrenan
Getting multiple messy lines into one single line
I have a file that contains the following:


:@:176:@:4:@:name:@:file:@:this is
a summary:@:description can be
long but who knows
can even have <br> tags.:@:how...
10,378
Posted By sysrenan
marcozd, I read Unix Shell Programming...
marcozd, I read Unix Shell Programming (http://www.amazon.com/Unix-Shell-Programming-Stephen-Kochan/dp/0672324903/) while ago, but I've learned the most online and by trying myself. Plus, this forum...
10,378
Posted By sysrenan
marcozd, you are welcome, great to be of help....
marcozd, you are welcome, great to be of help. And yes programming is always different in written, there are thousands of ways of coding the same program, but the logics are always the same.

And,...
7,139
Posted By sysrenan
same concept but without moving the file to a...
same concept but without moving the file to a temp file
sed -ni "/1104100311229/,\$p" logfilename
51,178
Posted By sysrenan
I've done this little script to delete lines from...
I've done this little script to delete lines from a file without moving it to a temporary file then moving back, it will start deleting line from line 1 to whatever % you choose.
name: truncade
...
6,943
Posted By sysrenan
hey Reddy482, you can use something like: ...
hey Reddy482,

you can use something like:


#!/bin/bash

if [ "$#" -eq 2 ]
then
SRC="$1"
DES="$2"

for file in `ls $SRC`
do
PREDT=`date...
2,523
Posted By sysrenan
Glad to help. A book I have "kind of old...
Glad to help.

A book I have "kind of old (2003)" but good, is the "Unix Shell Programming, third edition" Stephen G. Kochan and Patrick Wood...
10,378
Posted By sysrenan
I've tested this and it worked fine for me on...
I've tested this and it worked fine for me on your setup

I hope this helps solve your problem, please test it before running on the actual folders.


#!/bin/bash

for image in `ls -t...
4,681
Posted By sysrenan
temhem, you will not be able to run the command...
temhem, you will not be able to run the command "sh" on sftp, from what I know.

if you want to execute commands on serverB and have the output on serverA you can do for example:
ssh user@serverB...
Forum: IP Networking 11-11-2009
6,120
Posted By sysrenan
you can use: iptables -A OUTPUT -p icmp...
you can use:
iptables -A OUTPUT -p icmp --icmp-type 8 -j DROP

you can also try this (I never used personally):
echo "1" > /proc/sys/net/ipv4/icmp_echo_ignore_all

OR do it permanently on...
2,523
Posted By sysrenan
try this: #!/bin/bash counta=1 ...
try this:


#!/bin/bash

counta=1
CMD="ls -tr /dellxmax/application/log/"

for file in `$CMD`
do
DC=$(echo $file | awk '{ print substr( $0, length($0) - 20, length($0) ) }' | sed...
4,681
Posted By sysrenan
temhem, don't worry, when starting everything is...
temhem, don't worry, when starting everything is "unknown"
but here you can read a little about scp on wikipedia: Secure copy - Wikipedia, the free encyclopedia...
2,523
Posted By sysrenan
try this let me know if it helps, this is...
try this let me know if it helps, this is assuming you have the "stat" installed

I did this on a CentOS machine. If I understood your post this is what you are looking for just need to tweak it if...
Showing results 1 to 18 of 18

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