Sponsored Content
Full Discussion: Do syntax is correct ?
Top Forums Shell Programming and Scripting Do syntax is correct ? Post 302515847 by cambridge on Thursday 21st of April 2011 04:28:57 AM
Old 04-21-2011
Earlier you wrote:

Quote:
But this expression ns1 changes in many of the scenarios, so instead of this I need to use Regex
I took that to mean that you wanted a space between all namespaces. So I'm not quite clear on what you're asking for exactly.

Here are some more options:
Code:
sed 's/\(<\/[^>]*>\)\(<[^:]*:Errort\)/\1 \2/g' test > test2
sed 's/\(<\/[^>]*>\)\(<ns[0-9]*:Errort\)/\1 \2/g' test > test2
sed 's/\(<\/[^>]*>\)\(<ns1:Errort\)/\1 \2/g' test > test2

Regards,
Mark.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Correct Syntax For Calling Shell Script in Perl Module

Problem: I have a shell script that will be called by a Perl module that will connect to a db and delete rows. The Perl module will be called by CRON. I am using a Perl module to call a shell script because I need to get the db connection from Perl. Here is the Perl pseudocode: ... (4 Replies)
Discussion started by: mh53j_fe
4 Replies

2. UNIX for Dummies Questions & Answers

correct syntax for using "grep regex filename" ?

I'm trying to grep a long ls by looking at the beginning of each filename for example: Many files begin with yong_ho_free_2005... Many files begin with yong_ho_2005... I can't just use "grep yong_ho" otherwise It'll display both files. So I'm trying to use a regex but my syntax is wrong. ... (2 Replies)
Discussion started by: yongho
2 Replies

3. Shell Programming and Scripting

Pls correct the "if" syntax

Iam a learner of UNIX. Fortunately I got this site. I want to check the file for its existance. if echo " Not present" else echo "Present" fi The above code is working fine. But I also want to check for the files which are compressed. I tried the following code and it is not... (5 Replies)
Discussion started by: ganapati
5 Replies

4. Shell Programming and Scripting

Plz correct my syntax of shell script

Dear all I am still bit new in shell script area.I am writing down a shell script which I guess somewhere wrong so please kindly correct it. I would be greatful for that. What I actually want from this shell script is that it will move all the files one by one to another server which can be... (2 Replies)
Discussion started by: girish.batra
2 Replies

5. Shell Programming and Scripting

if [ $NOWDATE -gt $STARTDATE ] , date comparison correct syntax?

i've looked at a bunch of the date comparison threads on these boards but unfortunately not been able to figure this thing out yet. still confused by some of the way conditionals handle variables... here is what i where i am now... # a bunch of initializition steps are here ...... (1 Reply)
Discussion started by: danpaluska
1 Replies

6. Shell Programming and Scripting

Need Correct syntax for "if" in UNIX

I am trying to write a simple if statement but that driving me crazy:eek: with syntactical erorrs. This is what I managed to come up #!/bin/ksh USERNAME=`whoami` if ;then echo " you have logged in as report user" elif ; then echo " you have logged in as extract user" else " I dont... (3 Replies)
Discussion started by: kkb
3 Replies

7. UNIX Desktop Questions & Answers

Correct syntax

Hi, I want to check if file(s) exist even in subdirectories and perform an action. After searching here couldn't find solution that would work, but made my own solution that works fine: if then echo egrep "$1|$2|$3" `find| grep MLOG` else echo "MLOG does not exist" fiThat will check... (1 Reply)
Discussion started by: Vitoriung
1 Replies

8. Shell Programming and Scripting

Cannot find correct syntax to make file name uppercase letters

I have a file name : var=UsrAccChgRpt I want to make them upper case. Tried: $var | tr Error: tr: Invalid combination of options and Strings. Usage: tr | -ds | -s | -ds | -s ] String1 String2 tr { -d | -s | -d | -s } String1 Could you please help. I am using AIX... (2 Replies)
Discussion started by: digioleg54
2 Replies

9. OS X (Apple)

Can't figure out the correct syntax for a command loading a webkit plugin

Hello, Using Bash on Mac OS X 10.7.5 (Lion). I downloaded a GrowlSafari plugin for Webkit from its GitHub page GitHub - uasi/growl-safari-bridge: GrowlSafariBridge enables arbitrary javascript (including Safari Extensions) to notify via Growl.. In the description it says that after installing for... (0 Replies)
Discussion started by: scrutinizerix
0 Replies

10. UNIX for Beginners Questions & Answers

How to form a correct syntax to sift out according to complementary patterns with 'find'?

I need to find all files and folders containing keyword from the topmost directory deep down the tree but omitting all references to keyword in web-search logs and entries, i.e. excluding search and browsing history made using web-browser1, web-browser2, web-browser3, (bypassing all entries of the... (8 Replies)
Discussion started by: scrutinizerix
8 Replies
SKILL(1)							   User Commands							  SKILL(1)

NAME
skill, snice - send a signal or report process status SYNOPSIS
skill [signal] [options] expression snice [new priority] [options] expression DESCRIPTION
These tools are obsolete and unportable. The command syntax is poorly defined. Consider using the killall, pkill, and pgrep commands instead. The default signal for skill is TERM. Use -l or -L to list available signals. Particularly useful signals include HUP, INT, KILL, STOP, CONT, and 0. Alternate signals may be specified in three ways: -9 -SIGKILL -KILL. The default priority for snice is +4. Priority numbers range from +20 (slowest) to -20 (fastest). Negative priority numbers are restricted to administrative users. OPTIONS
-f, --fast Fast mode. This option has not been implemented. -i, --interactive Interactive use. You will be asked to approve each action. -l, --list List all signal names. -L, --table List all signal names in a nice table. -n, --no-action No action; perform a simulation of events that would occur but do not actually change the system. -v, --verbose Verbose; explain what is being done. -w, --warnings Enable warnings. This option has not been implemented. -h, --help Display help text and exit. -V, --version Display version information. PROCESS SELECTION OPTIONS
Selection criteria can be: terminal, user, pid, command. The options below may be used to ensure correct interpretation. -t, --tty tty The next expression is a terminal (tty or pty). -u, --user user The next expression is a username. -p, --pid pid The next expression is a process ID number. -c, --command command The next expression is a command name. --ns pid Match the processes that belong to the same namespace as pid. --nslist ns,... list which namespaces will be considered for the --ns option. Available namespaces: ipc, mnt, net, pid, user, uts. SIGNALS
The behavior of signals is explained in signal(7) manual page. EXAMPLES
snice -c seti -c crack +7 Slow down seti and crack commands. skill -KILL -t /dev/pts/* Kill users on PTY devices. skill -STOP -u viro -u lm -u davem Stop three users. SEE ALSO
kill(1), kill(2), killall(1), nice(1), pkill(1), renice(1), signal(7) STANDARDS
No standards apply. AUTHOR
Albert Cahalan <albert@users.sf.net> wrote skill and snice in 1999 as a replacement for a non-free version. REPORTING BUGS
Please send bug reports to <procps@freelists.org> procps-ng October 2011 SKILL(1)
All times are GMT -4. The time now is 06:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy