Sponsored Content
Top Forums Shell Programming and Scripting Explanation for interesting sed behaviour? Post 302356035 by Gavster on Thursday 24th of September 2009 10:20:16 AM
Old 09-24-2009
Many thanks pludi ... that makes more sense now. I had wondered about the parallelism of the statement but wasn't entirely sure how it would be treated.

I think I had assumed that the implied dependency of the output process on the input process would be understood by the scheduler but maybe it isn't that clever.

Gavin
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

any explanation for thsi shell script behaviour

hello whats the difference between excuting a shell script as a)sh myscript.sh b). ./myscript.sh i noticed that my shell script works fine when i run it as . ./myscript .sh but fails when i run it as sh myscript.sh could anybody explain why. the shell script is very simple ... (9 Replies)
Discussion started by: xiamin
9 Replies

2. Shell Programming and Scripting

sed command explanation needed

Hi, Could you please explain me the below statement -- phrase wise. sed -e :a -e '$q;N;'$cnt',$D;ba' abc.txt > xyz.txt if suppose $cnt contains value: 10 it copies last 9 lines of abc.txt to xyz.txt why it is copying last 9 rather than 10. and also what is ba and $D over there in... (4 Replies)
Discussion started by: subbukns
4 Replies

3. UNIX for Advanced & Expert Users

Strange sed behaviour

$ echo a.bc | sed -e "s/\|/\\|/g" |a|.|b|c| $ Is the behavior of the sed statement expected ? Or is this a bug in sed ? OS details Linux 2.6.9-55.0.0.0.2.ELsmp #1 SMP Wed May 2 14:59:56 PDT 2007 i686 i686 i386 GNU/Linux (8 Replies)
Discussion started by: vino
8 Replies

4. Shell Programming and Scripting

Weird sed behaviour in script

I've written a small script to replace certain words in all the the files in a directory. #!/bin/sh #Get list of files to be edited file_list=`ls -p` for i in $file_list do echo "Processing $i" alteredi=`echo "$i" | sed -e 's/\//d/'` if then if then #actual altering (2 Replies)
Discussion started by: Peetrus
2 Replies

5. Shell Programming and Scripting

A sed doubt - need explanation

Hi, The following command works fine for me, but I could not grasp the logic working behind of sed command, it's obscure to me :( :confused: echo "./20080916/core/audioex.amr" | sed "s%\(\)/%\1_%g" o/p: ./20080916_core_audioex.amr Could anyone please explain to me in detail, that how... (6 Replies)
Discussion started by: royalibrahim
6 Replies

6. Shell Programming and Scripting

strange behaviour from sed???

Hi all, I want to do a very simple thing with sed. I want to print out the line number of a disk I have defined in /etc/exports, so I do: It's all good, but here's the problem. When I define md0 in a variable, I get nothing from sed: Why is that? can anybody please help? Thanks (2 Replies)
Discussion started by: alirezan
2 Replies

7. UNIX for Dummies Questions & Answers

SED command explanation

can someone please explain the below sed command.. sed 's/\(*|\)\(.*\)/\2\1/' (6 Replies)
Discussion started by: raghu_shekar
6 Replies

8. Shell Programming and Scripting

interesting grep behaviour

I suppose that this is not actually a script question, but I noticed this while working on a bash script homework assignment and I have been impressed with the quality of posts here -- so that is why I posted it here. I have this text file named textfile: total 40 -rwxr-xr-x 1 joeblow... (2 Replies)
Discussion started by: landog
2 Replies

9. Shell Programming and Scripting

sed command explanation

Will someone give me an explanation on how the sed command below works. sed 's/.*//' Thanks! (3 Replies)
Discussion started by: scj2012
3 Replies

10. UNIX for Advanced & Expert Users

Interesting awk/Perl/sed parsing challenge

I have a log with entries like: out/target/product/imx53_smd/obj/STATIC_LIBRARIES/libwebcore_intermediates/Source/WebCore/bindings/V8HTMLVideoElement.cpp : target thumb C++: libwebcore <=... (8 Replies)
Discussion started by: glev2005
8 Replies
USERRET(9)						   BSD Kernel Developer's Manual						USERRET(9)

NAME
userret -- return path to user-mode execution SYNOPSIS
#include <sys/lwp.h> #include <sys/sched.h> void userret(struct lwp *l); DESCRIPTION
The userret() function is executed after processing a trap (e.g., a system call or interrupt) before returning to user-mode execution. The implementation is machine dependent and is never invoked from machine-independent code. The function prototype for each architecture may be different to the prototype above, however the functionally provided by the userret() function on each architecture is essentially the same. Specifically, the userret() function performs the following procedure: o Detect a change in the signal disposition of the current process and invoke postsig(9) to post the signal to the process. This may occur when the outcome of the trap or syscall posted a signal to the process (e.g., invalid instruction trap). o Check the want_resched flag to see if the scheduler requires the current process to be preempted by invoking preempt(9) (see cpu_need_resched(9)). This may occur if the clock interrupt causes the scheduler to determine that the current process has com- pleted its time slice. o Update the scheduler state. SEE ALSO
cpu_need_resched(9), postsig(9), preempt(9), scheduler(9) BSD
December 20, 2005 BSD
All times are GMT -4. The time now is 01:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy