Search Results

Search: Posts Made By: hobiwhenuknowme
2,442
Posted By john1212
set nohls forever vi .vimrc add line: set...
set nohls
forever
vi .vimrc
add line:
set nohls
15,115
Posted By pludi
I'd find it very unusual that you'd be able to...
I'd find it very unusual that you'd be able to create a file, but not remove it. Ask your system administrator about it, it might be a misconfiguration of ACLs or the like.

With vi, you can't...
15,115
Posted By jim mcnamara
vi uses /var/tmp for storing temporary versions...
vi uses /var/tmp for storing temporary versions of the file you edit. This is what you probably mean instead of a swap file.

I think you have your file mask set incorrectly. Unless you specified...
1,799
Posted By piking
I'm not sure what you mean by the first...
I'm not sure what you mean by the first questions, but Windows malware won't affect Ubuntu because the file systems are very different. Ubuntu should connect to the Internet automatically, if you are...
6,644
Posted By thegeek
but bash is missing in this website ??? ...
but bash is missing in this website ???

Rosetta Stone for Scripting Languages (http://www.lurklurk.org/rosetta.html)
2,424
Posted By pludi
What is UNIX (http://en.wikipedia.org/wiki/UNIX) ...
What is UNIX (http://en.wikipedia.org/wiki/UNIX)
History of UNIX (https://www.unix.com/unix-dummies-questions-answers/7-short-history-unix-l-madden-ic-ac-uk.html)
Various UNIX...
4,640
Posted By agama
ls -lS|head -6 You need -6 as there will...
ls -lS|head -6


You need -6 as there will be a total line from ls. You could always 'grep -v total' if you don't want to see it.

The -S option causes ls to sort by the file size from largest...
2,182
Posted By hergp
I think I found the problem -- your file probably...
I think I found the problem -- your file probably uses CR+LF as line separator.

Try this:

tr -d '\15' <filename | awk '$2 == $4'
2,182
Posted By rajamadhavan
To find the OS, run uname -a on your putty...
To find the OS, run uname -a on your putty terminal..


awk '{if($2==$4) print}' FS=" " filename
2,182
Posted By hergp
Hmm, works here. What OS are you using? ...
Hmm, works here. What OS are you using?

Does

awk '$2 == $4 { print; }' filename

work? If you have nawk or gawk, try this.
2,182
Posted By rajamadhavan
awk ' $2==$4 ' filename It should provide...
awk ' $2==$4 ' filename


It should provide what you require. if the fields are seperated by tab you must use


awk '$2==$4' FS=\t filename


-Raja
Forum: Programming 03-08-2007
5,717
Posted By Hitori
/* Includes */ #include <unistd.h> /*...
/* Includes */
#include <unistd.h> /* Symbolic Constants */
#include <sys/types.h> /* Primitive System Data Types */
#include <errno.h> /* Errors */
#include <stdio.h> /*...
2,182
Posted By Ygor
Try...awk '$2==$4' file
Try...awk '$2==$4' file
20,676
Posted By rajamadhavan
Hi, Which is your OS ? That script did work...
Hi,
Which is your OS ? That script did work for me on Linux


>>egrep -Hon "[0-9][0-9][0-9][0-9]" *
id-1:4:2345
id-2:3:3467
id-2:5:7856
id-2:7:8923
log:1:2010
log:2:1982
log:2:2005...
20,676
Posted By rajamadhavan
try this if it helps you..It prints all 4 digit...
try this if it helps you..It prints all 4 digit numbers if irrespective its id or not...


egrep -Hon "[0-9][0-9][0-9][0-9]" /home/user



This works on linux...if your OS is missing some of...
20,676
Posted By guruprasadpr
Hi Please post a sample input and output file...
Hi
Please post a sample input and output file which will make us understand better.

Guru.
2,913
Posted By Ikon
w -uh | grep -om 3 '^\S*'
w -uh | grep -om 3 '^\S*'
4,283
Posted By amro1
It is never too late, but it is not for everyone...
Take me right, please. Learning UNIX today is well beyond UNIX itself. When I started some 20+ years ago, knowing UNIX was sufficient, today it is not. Today, to have real chance of employment in...
1,351
Posted By Tytalus
couple of ways: # echo...
couple of ways:


# echo "/home/user/backup/scripts/SDW/sql/backup.sql" | sed 's/.*\/\([^\/\.]*\)\..*/\1/'
backup

or

# echo "/home/user/backup/scripts/SDW/sql/backup.sql" |nawk -F"[/.]"...
1,735
Posted By agama
You've hit the nail straight on -- a simple...
You've hit the nail straight on -- a simple script would be perfect. Not only does it allow you the freedom to run one command to accomplish several tasks, its easy to repeat the process if that is...
8,212
Posted By agama
Output to a temporary file, and then move it over...
Output to a temporary file, and then move it over top of the original file. The trick is to not overlay the original file if the command fails.


#!/usr/bin/env ksh

# straight forward:
if...
1,643
Posted By kurumi
sed -r...
sed -r 's/\([0-9]+\)//;s/[0-9][0-9]*-[0-9][0-9]*//' file
3,775
Posted By anbu23
grep -n '[0-9"]$' test
grep -n '[0-9"]$' test
1,364
Posted By Scott
Your script is #!/bin/bash if [ $# -ne...
Your script is


#!/bin/bash
if [ $# -ne 2 ]; then
echo "Usage: $0 Animal Description"
exit
fi

filename=~/.animals
is_in_file=`grep "$1" $filename`
if [ -n "$is_in_file" ]; then ...
1,364
Posted By Scott
That's to say, something like: ...
That's to say, something like:


#!/bin/bash
if [ $# -ne 2 ]; then
echo "Usage: $0 Animal Description"
exit
fi

filename=~/.animals
is_in_file=`grep "$1" $filename`
if [ -n...
Showing results 1 to 25 of 26

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