Search Results

Search: Posts Made By: tukuyomi
947
Posted By Scrutinizer
Try: Zet=$(wc -l <...
Try:
Zet=$(wc -l < /home/$USER/Desktop/14tilt.txt)
Ted=$(wc -c < /home/$USER/Desktop/14tilt.txt)

Then you should not need the cut commands either...
2,474
Posted By Scrutinizer
How about something like: while read script1 &&...
How about something like:
while read script1 && read script2 <&3
do
"$script1" &
"$script2" &
wait
done < script1.txt 3<script2.txt


Variable script1 is read from file descriptor 0...
11,615
Posted By RudiC
Try also awk '!/no hit/' RS= ORS="\n\n"...
Try also awk '!/no hit/' RS= ORS="\n\n" file
6,151
Posted By Corona688
tr does not work that way. It deals with...
tr does not work that way. It deals with individual characters, not strings. Since you gave it two characters on the input, it's expecting 2 characters on the output, too.

This should work:
...
Forum: Red Hat 05-19-2013
1,931
Posted By Don Cragun
The standards say that the type time_t is an...
The standards say that the type time_t is an integral type. They don't specify whether the type is signed or unsigned. On systems with a signed 64-bit time_t, any time from the big bang to the...
2,906
Posted By Don Cragun
There was a major difference in the behavior of...
There was a major difference in the behavior of the echo utility (or shell built-in) between 4.2BSD (from the University of California, Berkeley) and UNIX System V (from AT&T Bell Laboratories). In...
1,354
Posted By ctsgnb
awk -F= '{x=$1;$1=z;gsub(OFS,RS x FS)}1' yourfile
awk -F= '{x=$1;$1=z;gsub(OFS,RS x FS)}1' yourfile
12,202
Posted By Scrutinizer
@tukuyomi: $ cat test.sh echo "\$# \"$#\"" ...
@tukuyomi:
$ cat test.sh
echo "\$# \"$#\""
echo "\$1 \"$1\""
echo "\$2 \"$2\""
if [ "$1" = '' ]; then
echo no arguments given
fi

$ ./test.sh
$# "0"
$1 ""
$2 ""
no arguments given
...
13,607
Posted By Corona688
Read user input from /dev/tty, to avoid...
Read user input from /dev/tty, to avoid accidentally reading input from the pipe or file instead. /dev/tty will always be the current terminal, if any.

... | while read LINE
do
printf...
1,132
Posted By Scrutinizer
for ((i=1; i<=65535; i++)); do printf...
for ((i=1; i<=65535; i++)); do
printf "%04X\n" "$i"
done

Posix:
i=0
while [ $i -le 65534 ] ; do
printf "%04X\n" "$((i+=1))"
done
1,165
Posted By locoroco
I have found the solution for bash: mogrify...
I have found the solution for bash:
mogrify -resize x120 *.jpg

Mogrify is a part of ImageMagick
1,865
Posted By
perl -pe 's/\s(SNAG|MARC|EA|ER)/\n$1/g' file.in >...
perl -pe 's/\s(SNAG|MARC|EA|ER)/\n$1/g' file.in > file.out
1,514
Posted By Corona688
-n is closer to what you want, but a lot of that...
-n is closer to what you want, but a lot of that pipe chaining in backticks is pointless since you know the PID. Just watch if /proc/pid still exists, each running process gets a directory inside...
6,957
Posted By alister
You don't really need the non-portable -r option...
You don't really need the non-portable -r option for that sed task. To avoid -r, simply use the equivalent basic regular expression syntax by backslash-escaping the parentheses.

Regards,
Alister
1,229
Posted By Chubler_XL
$ grep -f f1 f2 1|d 2|e 3|f 4|g 5|h ...
$ grep -f f1 f2
1|d
2|e
3|f
4|g
5|h


or
$ awk -F\| 'NR==FNR{A[$1]++;next} A[$1]' f1 f2

or
awk -F\| 'NR==FNR{A[$1]=$0;next} $1 in A { print A[$1] }' f2 f1
2,477
Posted By Scrutinizer
awk -F\| 'A[$1]++==1' f1 f2
awk -F\| 'A[$1]++==1' f1 f2
2,529
Posted By alister
sed 'h; s/=.*/=/; x; s/^[^=]*=//;...
sed 'h; s/=.*/=/; x; s/^[^=]*=//; s/change/different/g; H; g; s/\n//'


Sample run:

$ cat data
somechangeVariable1=Something I would like to change something
somechangeVariable2=Something...
Showing results 1 to 17 of 17

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