Questions tagged [pipelining]
25 questions
3
votes
1 answer
Pipeline input to executable with PowerShell
I need to execute the following command in PowerShell:
%windir%\system32\inetsrv\appcmd add site /in < c:\mywebsite.xml
I am trying to do it like this:
$appCmd = "$Env:SystemRoot\system32\inetsrv\appcmd.exe"
[String] $targetFilePath =…
Maxim V. Pavlov
- 1,583
- 6
- 22
- 35
3
votes
3 answers
What does |I`E`X mean in powershell?
I am writing a powershell interpreter that looks at Malware. And I have some text I don't know how to parse. It looks like a pipeline but what comes after the pipe doesn't make sense to me and the interpreter I am modifying doesn't not handle. The…
intel_chris
- 508
- 1
- 5
- 18
2
votes
2 answers
Pipelining increases clock speed?
So I recently taken interest in learning about computer hardware and thought you guys might help, I am referring Upgrading and Repairing PCs book and came across pipelining since I wanted to have a good understanding how it worked I went through…
Saumitra Kulkarni
- 21
- 3
2
votes
2 answers
Use pipe viewer when streaming directory through tar
I am currently streaming a directory over SSH after compressing it through tar:
tar cz /path/to/foo | pv | ssh HOSTNAME 'tar xmz && some-cool-command'
The issue is that pv doesn't know the total size of the stream so it cannot show me a proper…
Christoffer Reijer
- 121
- 3
1
vote
2 answers
Use command in file to enter mysql or other shell like environment
Let’s say we have password stored in /root/mysql-password. Is there a way to connect to MySQL without manually coping password from that file and entering to mysql -u root -p{passowrd}?
For example something like this:
mysql -u root -p | {command}…
RuslanN
- 111
- 1
1
vote
1 answer
Latency semantics of read registers on x86 ASM
Per A. Fog's instruction tables, an Ivy Bridge has a 3 cycle latency on a MOV instruction.
So the following will take 3 cycles to move RAX into the address in RCX:
mov [rcx], rax
My question is, does this imply that RAX, which is…
IamIC
- 155
- 10
1
vote
2 answers
Type file content, pipe some actions and put result back
Is there way to do something like thas:
cat somefile.txt | sort | uniq > somefile.txt
I.e. I want to list entire file, then pipe some actions to its content and finally put result back to source file overwriting it completely. For now I doing it by…
Alex G.P.
- 113
- 6
1
vote
2 answers
Running powershell scripts or functions using unix-like pipeline syntax
I want to run multiple custom processing steps using the pipeline in powershell.
In linux I could do something like this:
listServers.sh | | commandToApplyToEachServer.sh
And put code relevant to each step in…
Cyberwiz
- 121
- 5
1
vote
1 answer
Searching for matches in a non-cmdlet's output
I'm evidently misunderstanding something about PowerShell's piping (I'm quite new to the language).
I'm trying to "grep" for a certain match in the help menu of ssh-keygen. For a simple example, I'm trying to find every line that contains a "C" (I…
Carcigenicate
- 291
- 1
- 4
- 20
1
vote
1 answer
Is there an option that mkdir does not return an object for the duration of an interactive PowerShell session?
mkdir in PowerShell returns the created directory which gets printed by default. When in an interactive PowerShell session, I get slightly disturbed by that default. Of course, I can turn the printing off by redirecting the output to $null:
mkdir…
René Nyffenegger
- 2,249
- 7
- 33
- 46
1
vote
1 answer
How to overwrite with a pipe in unix
So I am attempting to overwrite using a pipe:
//reads contents of file| turns lowercase to uppercase | changes $ to # |
// then attempts to overwrite original file with new version
cat cutTester.txt|tr '[a-z]' '[A-Z]'|tr '$' '#'…
bordenE
- 11
- 1
- 2
0
votes
2 answers
Pass output of one command as input to other
I have searched one file "portmap" inside root directory as follows:
find -name "portmap"
It gives location of file
.init/...somepath./portmap
Now I want to change my current directory to the location of portmap file and print the present working…
techfun
- 417
- 3
- 7
- 10
0
votes
2 answers
Can `find` piped to `echo` be used to do massive harm?
I am currently taking the Google cybersecurity coursera cert course. I am now in the Linux section and learning a few Linux commands, I am totally new to it but I was wondering about one thing. While I am learning I always try to think of how a…
zohan d
0
votes
0 answers
Create a CD pipeline for my Github project with Github Actions (good practices, ...)
For a some time now I'm thinking about a way to setup a continuous delivery pipeline and don't seem to get my head around it.
I want to auto-create a Github release with a corresponding tag. Plus I want to update the version in a file inside the…
Sebastian Sommerfeld
- 153
- 7
0
votes
0 answers
Is it correct that sudo doesn't work in pipelines and how to overcome it?
Once I tried command..
sudo iptables-save > /etc/iptables/rules.v4
..to save iptables to some file. Its interesting that I failed to run this command: it said I have insufficient permissions. The file itself was not available for writing for my…
MiamiBeach
- 203
- 1
- 3
- 7