Search Results

Search: Posts Made By: xerox
10,685
Posted By chakrapani
there was a command called screendump similar to...
there was a command called screendump similar to setterm -dump which get details from ttys

Something similar to:
Linux.com :: Everything Linux and Open Source...
1,747
Posted By balajesuri
c=1; while read x; do echo $x | grep -q "object";...
c=1; while read x; do echo $x | grep -q "object";
if [ $? -eq 0 ]; then
echo $x | sed "s/^/$c\. /"; c=$(($c + 1)); else echo $x;
fi;
done < input
6,238
Posted By Corona688
Changing /etc/adjtime won't fix the clock being...
Changing /etc/adjtime won't fix the clock being off by n minutes, it'll put your computer in a different time zone.

I suspect he set it to UTC so he could set the clock using NTP. Most servers...
6,238
Posted By rbatte1
Probably better to investigate using Network Time...
Probably better to investigate using Network Time Protocol. The deamon ntpd or xntpd will have to be enabled and you will need a time source available to follow. Probably best to use a reliable one...
2,048
Posted By itkamaraj
awk '! /o$|o.cmd$|.order$/ {print} ' inputfile >...
awk '! /o$|o.cmd$|.order$/ {print} ' inputfile > outputfile

egrep -v ".o$|.o.cmd$|.order$" inputfile > outputfile
2,048
Posted By rangarasan
GREP
ya right.., thanks mate:)
2,048
Posted By itkamaraj
$ egrep -v ".o$|.o.cmd$" test >...
$ egrep -v ".o$|.o.cmd$" test
> /arch/powerpc/boot/addnote
5766a5769
> /arch/powerpc/boot/.addnote.cmd
5768a5772,5773
5769a5775,5778
2,048
Posted By rangarasan
GREP
Hi,
Try this one,

egrep -v '.o|o.cmd' inputfile >outputfile

Cheers,
Ranga:)
2,048
Posted By itkamaraj
awk '! /o$|o.cmd$/ {print} ' inputfile >...
awk '! /o$|o.cmd$/ {print} ' inputfile > outputfile
1,952
Posted By EAGL€
echo "busybox-1.11.1-1_WR3.0bg.armv6jel_vfp.rpm"...
echo "busybox-1.11.1-1_WR3.0bg.armv6jel_vfp.rpm" | sed 's/\(.*\)\....$/\1/'
1,952
Posted By michaelrozar17
[0-9] - matches a number [^_]* - matches...
[0-9] - matches a number

[^_]* - matches anything except an uderscore

So from the line echo 'activemq-cpp-library-3.0.1-1_WR3.0bg.armv6jel_vfp'
first it matches the number, here 3 and...
1,952
Posted By michaelrozar17
Or try.. echo...
Or try..
echo 'python-2.5.1-26_WR3.0bg.armv6jel_vfp'| sed 's/^[^0-9]*-\([0-9][^_]*\)_.*/\1/'
echo 'activemq-cpp-library-3.0.1-1_WR3.0bg.armv6jel_vfp' | sed 's/^[^0-9]*-\([0-9][^_]*\)_.*/\1/'
1,952
Posted By yazu
Try: sed '/^[^0-9]*\([0-9][0-9.-]*\).*$/ s//\1/'
Try:
sed '/^[^0-9]*\([0-9][0-9.-]*\).*$/ s//\1/'
1,108
Posted By pludi
Any reason you didn't already tell us about this...
Any reason you didn't already tell us about this in your other thread (https://www.unix.com/shell-programming-scripting/158983-c-binary-not-being-executed-shell_exec.html)?
2,505
Posted By jim mcnamara
exec() invokes the system call, exec. This means...
exec() invokes the system call, exec. This means two things
1. /bin/sh is the shell you run under - whatever that is on your system
2. The environment settings probabyl do not match what you get...
24,115
Posted By cfajohnson
Yes ... if you are using a shell which supports...
Yes ... if you are using a shell which supports arrays.

First, don't declare the arrays; just assign values to them.



---------- Post updated at 01:21 AM ---------- Previous update was at...
24,115
Posted By kshji
What is your shell ? ksh, bash, ... And most of...
What is your shell ? ksh, bash, ...
And most of use case, you don't need to define array. Use it.

a[1]=value
a=( * )
set -A array -- $*
1
1,068
Posted By Perderabo
That's rather nebulous. But a good place to...
That's rather nebulous. But a good place to start is to define the language to be used. You want shell scripts that can run on any platform you are likely to use. For the shell itself, I would go...
4,657
Posted By durden_tyler
It did not work because you typed: ^@ ...
It did not work because you typed:


^@


despite being told to type:


<Ctrl-V><Enter>


No wonder it did not work.

tyler_durden

Try "\r" alternatively; looks like it works...
1,478
Posted By zaxxon
There is several non-deleting solutions up there....
There is several non-deleting solutions up there. Pick one, try it out.
1,478
Posted By Franklin52
Or: sed 's/@//' file sed...
Or:
sed 's/@//' file

sed 's/\.\(.*\)\./\1/' file

sed 's/@\(.*\)@/\1/' file

awk -F"@" '{print $2}' file
1,478
Posted By zaxxon
sed 's/@\([^@]*\)@/\1/g' infile or just...
sed 's/@\([^@]*\)@/\1/g' infile

or just delete the @ if possible

tr -d '@' < infile
1,844
Posted By ctsgnb
sed will take the strings following "Interface="...
sed will take the strings following "Interface=" till end of line
1,844
Posted By ctsgnb
s/pattern1/pattern2/ | substitute pattern1 with...
s/pattern1/pattern2/ | substitute pattern1 with pattern2
.* |dot means any character * means zero or more occurrence of the previous patter so .* means any string
\( \) \( \) ... | what is...
4,657
Posted By pravin27
Could this help you ? perl -i -pe 's/\r//g'...
Could this help you ?
perl -i -pe 's/\r//g' inputfile
Showing results 1 to 25 of 27

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