Search Results

Search: Posts Made By: rakeshkumar
3,070
Posted By Don Cragun
That is not a even close to a clear...
That is not a even close to a clear specification.

We don't know what constitutes a variable name in the language you're trying to match.

We don't know if quotes can be escaped.

We don't...
3,070
Posted By Don Cragun
Noting that \w is not a "standard" feature in an...
Noting that \w is not a "standard" feature in an extended regular expression and noting that on systems where \w is requesting a match to a word, there is no word between the = and the ' in...
Forum: Web Development 10-10-2013
2,153
Posted By Scott
I would change the Apache user and group back to...
I would change the Apache user and group back to the original, then create a new group, add users prob and wwwrun to it, then change the group ownership of the /mydirectory directory to that group,...
1,447
Posted By alister
The for-loop is unnecessary. Just use find's...
The for-loop is unnecessary. Just use find's -exec.

Regards,
Alister
1,447
Posted By in2nix4life
ls -R .: test1 test2 test3 ./test1: ...
ls -R
.:
test1 test2 test3

./test1:
abc.jar

./test2:
abc.jar

./test3:
abc.jar

for f in $(find . -name 'abc.jar' -type f);do mv -vv $f ${f/.jar/_backup.jar};done
'./test1/abc.jar'...
5,322
Posted By ahamed101
mv is not throwing the error. May be someone else...
mv is not throwing the error. May be someone else can explain it - it has something to do with the stat in find command.

Not sure what difference it will make but try this
find . -name...
2,094
Posted By cero
MS-Windows does not allow filenames with colons.
MS-Windows does not allow filenames with colons.
2,109
Posted By complex.invoke
lsof -i -p 9402 | sed...
lsof -i -p 9402 | sed '/9402/!d;s/\(.*\)->\(.*\):\(.*\)/\2/g' | awk '{++a[$1]}END{for(i in a)print i,a[i]}'
2,109
Posted By Scrutinizer
The string of commands contains a flaw, because...
The string of commands contains a flaw, because for the awks FS is not set prior to reading the input (but while on line 1), the field splitting will only be in effect on line 2 and further (and line...
14,361
Posted By clx
You might want to look here...
You might want to look here (https://www.unix.com/shell-programming-scripting/26542-shell-script-animation.html).
Also here...
14,361
Posted By donadarsh
If you want to calculate percentage by using one...
If you want to calculate percentage by using one expression, use -

echo "Percentage% =" `expr \( \( 8500 - 8000 \) \* 100 \) / 2000`"%"
14,361
Posted By gary_w
This little example should show you output that...
This little example should show you output that stays on one line:
$ cat x
#!/bin/ksh

integer i=0

while [[ $i -lt 10 ]]; do
##
## \r = carriage return
## \c = suppress linefeed
##
...
Forum: Programming 05-03-2012
2,243
Posted By Corona688
Here's an extremely simple way: #include...
Here's an extremely simple way:

#include <stdio.h>
#include <signal.h>

void showspin(void) // Shows a different charcter every time its called
{
static char *spin="-/|\\", pos=0;...
145,546
Posted By complex.invoke
Tetris Game -- The Art Of Shell Programming
GitHub - deepgrace/tetris: Tetris implementation in all kinds of Programming Languages (https://github.com/deepgrace/tetris)

Usage: bash Tetris_Game [ <runlevel> [ <previewlevel> [ <speedlevel> [...
2,550
Posted By curleb
another option is to embed the shell variable...
another option is to embed the shell variable itself without using awk's variables:

ps -ef |awk '($8~/proc/ && $9~'$(echo "r${SVRNAME}")') {print $2}'
961
Posted By itkamaraj
http://honeypots.sourceforge.net/script.c.solaris....
http://honeypots.sourceforge.net/script.c.solaris.txt
22,292
Posted By bartus11
Try: find ./ -type f -mtime +x-days -name "G00*"...
Try: find ./ -type f -mtime +x-days -name "G00*" -exec du -k {} \; | awk '{total+=$1}END{print "TOTAL" total/1024}'
2,836
Posted By Corona688
This is probably because tar is being broken into...
This is probably because tar is being broken into multiple calls by xargs like said above. xargs can only feed tar 64 kilobytes worth of arguments at a time. Each time tar gets called, it...
2,836
Posted By methyl
Please post the Operating System and version and...
Please post the Operating System and version and Shell.

There is much variation in the behaviour of "tar". There is also variation in the behaviour of xargs. In this case I believe that xargs is...
2,836
Posted By m.d.ludwig
The reason you are not getting what you expect is...
The reason you are not getting what you expect is that xargs is re-invoking tar every time the command line fills. cpio could be used, or you could use the "-T" option of tar:
find ./ -type f -mtime...
2,154
Posted By frappa
Hi, you can try: egrep -v -f input.txt...
Hi,

you can try:
egrep -v -f input.txt original.txt > output.txt

see ya
fra
2,154
Posted By ningy
-bash-3.2$ cat ori-file line1 line2 line3 ...
-bash-3.2$ cat ori-file
line1
line2
line3
line4
line5
-bash-3.2$ cat input-file
line2
line3

-bash-3.2$ grep -v -f input-file ori-file
line1
line4
line5
2,217
Posted By jayan_jay
Expecting this ... $ awk '{print...
Expecting this ...

$ awk '{print $1"*",$2,$3}' infile
4,857
Posted By vgersh99
I'm not sure what this will accomplish as you...
I'm not sure what this will accomplish as you have blank lines AND some of the lines ARE different - see my previous explanation of the findings.
4,857
Posted By vgersh99
compare the file contents starting at file1's...
compare the file contents starting at file1's line:

007100 01 BRTB-COMM-BYTE-POINTER9 REDEFINES

you have extra blank lines. plus lines containing 007200 are not the same. The code behaves as...
Showing results 1 to 25 of 37

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