Visit The New, Modern Unix Linux Community

Search Results

Search: Posts Made By: Ygor
739
Posted By Ygor
Try...diff file[12].csv | awk -F '_|,'...
Try...diff file[12].csv | awk -F '_|,' '{a[$2]=$0;b[$2]++}END{for(i in a)if(b[i]==1)print a[i]}'
36,388
Posted By Ygor
The Advanced Bash-Scripting Guide has some...
The Advanced Bash-Scripting Guide has some exercises (http://www.tldp.org/LDP/abs/html/exercises.html).
12,214
Posted By Ygor
To execute the block, you need to have a slash /...
To execute the block, you need to have a slash / on a line of its own, after the END; line.
1,642
Posted By Ygor
Try something like...$ string1='3X' $ case...
Try something like...$ string1='3X'

$ case $string1 in [0-9][0-9]) : ;; [0-9]?) string1=${string1:0:1} ;; esac

$ echo $string1
3

$
3,347
Posted By Ygor
Try converting the txt file to dos format, via...
Try converting the txt file to dos format, via unix2dos or similar, before using uuencode.
973
Posted By Ygor
Try...$ cat file1 Tom|london Tom|london ...
Try...$ cat file1
Tom|london
Tom|london
Tom|Paris
Adam|Madrid
Adam|NY
Tom|amsterdam
Tom|amsterdam
Tom|amsterdam
Tom|amsterdam

$ awk -F'|'...
Forum: Linux 08-07-2013
3,439
Posted By Ygor
I think the question has already been answered,...
I think the question has already been answered, but to reduce confusion, perhaps include the time zone %Z to see what is happening...
$ date --date "1979-10-26" '+%Y%m%d%H %Z'
1979102600 GMTDT

$...
10,845
Posted By Ygor
You can just use sed....sed '/PATTERN/s/ to be...
You can just use sed....sed '/PATTERN/s/ to be changed/, YEHA! to be changed/' FILENAME
Forum: What is on Your Mind? 03-20-2013
3,431
Posted By Ygor
I agree that it's difficult to help people when...
I agree that it's difficult to help people when it's difficult to grok the lingo.
21,870
Posted By Ygor
try cut
try cut
10,081
Posted By Ygor
sendmail is usually in /usr/sbin and not on the...
sendmail is usually in /usr/sbin and not on the normal path
1,965
Posted By Ygor
The script seems fine to me. Try running it with...
The script seems fine to me. Try running it with -x option, as in: sh -x scriptname
10,081
Posted By Ygor
Some possible solutions in this thread... ...
Some possible solutions in this thread...
https://www.unix.com/unix-advanced-expert-users/14177-unable-sent-mail-html-format-mailx-command.html
1,903
Posted By Ygor
Works fine for me. What system are you on? Do you...
Works fine for me. What system are you on? Do you have nawk or gawk?
1,903
Posted By Ygor
Try...awk ' NR == 1 { from = $2 ...
Try...awk ' NR == 1 {
from = $2
"date -u +%Y%m%d" | getline to
$NF = to
}
NR == 2 {
"expr $(date -d " to " +%s) - $(date -d "...
Forum: Linux 10-08-2012
2,190
Posted By Ygor
Try...awk '$3=="sil"{if(p)print...
Try...awk '$3=="sil"{if(p)print p,$1,w;w="";getline;p=$1}{w=w $3}' file
7,542
Posted By Ygor
I thought that file ownership is just a user ID...
I thought that file ownership is just a user ID number, which you can see using ls -ln
509
Posted By Ygor
Try...awk 'c<$1{while(c<$1-1)print ++c,0}{print...
Try...awk 'c<$1{while(c<$1-1)print ++c,0}{print c=$1,1}' c=-1 file1
1,459
Posted By Ygor
Try...$ n='1-3,6,7,9-11' $ seq 1 14|paste...
Try...$ n='1-3,6,7,9-11'

$ seq 1 14|paste -s|cut -f "$n"|tr '\t' ' '
1 2 3 6 7 9 10 11

$
1,397
Posted By Ygor
See... https://www.unix.com/302098992-post2.html
See... https://www.unix.com/302098992-post2.html
1,676
Posted By Ygor
I would guess that it depends on how you remove...
I would guess that it depends on how you remove the top lines. This is at the bash prompt...$ echo x > file1

$ ( ( echo a ; sleep 30 ; echo b ) | tee -a file1 ) &
[1] 7000

$ a


$ sed -i 1d...
Forum: Programming 09-20-2012
1,470
Posted By Ygor
Save it as a CSV file and define it as an...
Save it as a CSV file and define it as an external table.
18,347
Posted By Ygor
Using awk...$ rand=$(awk...
Using awk...$ rand=$(awk 'BEGIN{srand();for(i=1;i<=32;i++)printf "%x", int(rand()*16)}')

$ echo $rand
b9645ca2f0c5f55ed1411258d57b5bb5

$
3,368
Posted By Ygor
Using your solution and tac...$ cat test.txt ...
Using your solution and tac...$ cat test.txt
TEST
JOHN
ADAM
MICHAEL
SEBASTIAN
ANDY

$ tac test.txt | sed '/MICHAEL/,+2d' | tac
TEST
SEBASTIAN
ANDY

$
697
Posted By Ygor
Oh I see the problem. $1 and $2 are local to...
Oh I see the problem. $1 and $2 are local to functions but you are not passing parameters to the function. Perhaps define a and b outside of the functions, e.g...$ cat sh.1
menu ()
{
echo...
Showing results 1 to 25 of 500

 

Featured Tech Videos

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