9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi.
I'm trying to do a "simple" thing.
grep -rls grepped_exp path | xgs
where xgs is an alias to something like:
xargs gvim -o -c ":g/grepped_exp"
now the problem is that I want to pass the "grepped_exp" to the piped alias.
I was able to do something like what I want without the... (4 Replies)
Discussion started by: hagaysp
4 Replies
2. Red Hat
hi guys,
booting centos7 and use systemd execute system command ulimit -SHn 202400 is fail.i dont know what's reason.can you give me help.
------------------------------------------
set-ulimit.service
Description=test service
After=systemd-update-utmp-runlevel.service #the last... (1 Reply)
Discussion started by: shean
1 Replies
3. Programming
Hi again ;) Now I want to make a program that will execute the programs with exec, asking the user if he wants the program to run in background or foreground.
scanf("%c",&caracter);
if (caracter=='y'){
printf("Has decidido ejecutarlo en background\n");
if((pid=fork())==0) {// fork para... (3 Replies)
Discussion started by: lamachejo
3 Replies
4. UNIX for Dummies Questions & Answers
I can't get this to work. Running a single command works fine:
find . -name "*.dat" -exec wc -l '{}' \;
gives me the file name and number of lines in each .dat file in the directory.
But what if I want to pipe commands, e.g. to grep something and get the number of lines with that pattern... (3 Replies)
Discussion started by: DJR
3 Replies
5. OS X (Apple)
Hi all,
I want to execute a command when system boots. I tried to edit /etc/rc.common and add my command at the end of rc.common, but it does not work!
Anyone knows how to do it?
Thanks :) (6 Replies)
Discussion started by: andrewust
6 Replies
6. Shell Programming and Scripting
grep $SEARCH_STRING /etc/passwd | cut -d":" -f 1,5
I need to check the $? value of grep in the above. If I place a test for $? after the above piped command, it returns success status of grep piped to cut.
How can I get the success status of grep alone? (5 Replies)
Discussion started by: krishmaths
5 Replies
7. Shell Programming and Scripting
Hi,
I wrote a smiple ksh function
send_notification() {
...
}
and want to execute it on each file, matched by the find command.
I tried:
find / -name "*.err" -mtime -8 -exec send_notification {} \;
but it doesn't work. What should I do? I work in ksh on Hp-Ux.
Regards,
Pit (11 Replies)
Discussion started by: piooooter
11 Replies
8. AIX
Hi Folks,
I have an AIX server and I would like the server to run the command saprouter -r at every system restarts. It needs to be run by a specific user. How would I do that?
Thanks!!! (1 Reply)
Discussion started by: brookingsd
1 Replies
9. Shell Programming and Scripting
I'm using the fabulous perl. I need a way to tell when a piped call to "open" has completed. Can I do this with a command like <ShellPipe> ??
Reason behind this:
I'm trying to write a backup script in perl! This script will download a certain file from my web server, to my computer.
Now,... (0 Replies)
Discussion started by: boytheo
0 Replies