9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Im currently running this command to satisfy a particular task. it works for my purposes. but i want to be able to optimize this string of commands and have it be reduced to 1 or 2 commands, if at all possible:
head -4 datafile 2>/dev/null | cut -c1-400 | wc | awk '{print $2$1$3}' (5 Replies)
Discussion started by: SkySmart
5 Replies
2. Shell Programming and Scripting
I have a file and need to only select users that have a shell of “/bin/bash” in the line using awk or sed please help (4 Replies)
Discussion started by: boyboy1212
4 Replies
3. Shell Programming and Scripting
Dear All,
Please advice about this issue.
when i run this line in a script if && || && || && if i enter $x = test3 and $y = test1 the If condition apply while it should not
Best Regards (2 Replies)
Discussion started by: islam.said
2 Replies
4. Shell Programming and Scripting
I am learning to build from SVN and other tools, with a lot of copying and pasting from forums. I like to append && echo "success" to all commands so that I can see at a glance if things went all right. Is there a way that I can have the bash shell append this to all commands?
Thanks! (5 Replies)
Discussion started by: dotancohen
5 Replies
5. Shell Programming and Scripting
Hi All,
Hope someone can advise here as I have been struggling to find a syntax that works here. I have tried a stack of combination I have seed in the forums but I think because I have needed to use "" and `` in the statments another method is found.
I am reading in lines with the following... (1 Reply)
Discussion started by: nkwilliams
1 Replies
6. Shell Programming and Scripting
I have been reading for a few hours trying to educate myself enough to accomplish this task, so please know I have performed some research. Unfortunately, I am not a *NIX scripting expert, or a coder. I come from a network background instead.
SO, here is my desired outcome. I have some Cisco... (5 Replies)
Discussion started by: abbzer0
5 Replies
7. UNIX for Dummies Questions & Answers
Dear all,
I have to calculate sum of record count of files of the specified directory.
First I tried the following way which prints one or more outputs.
How can I sum of this output?
find /home/work/tmp/1/O/ -type f -print0 | xargs -0 wc -l | grep total
1666288 total
1073908 total
... (4 Replies)
Discussion started by: mr_bold
4 Replies
8. UNIX for Dummies Questions & Answers
I want to show a output like this
Lee Ballancore
PID TTY TIME CMD
31799 pts/3 00:00:00 vim
31866 pts/3 00:00:00 vim
2495 pts/7 00:00:00 vim
8368 pts/0 00:00:00 vim
9544 pts/2 00:00:00 ps
Alistairr Rutherford
PID TTY TIME CMD
8368 pts/0 00:00:00 vim
9544 pts/2 00:00:00 ps
... (3 Replies)
Discussion started by: nehaquick
3 Replies
9. UNIX for Dummies Questions & Answers
Hello All,
I just wanted to know what are the different ways of using commands in combination.
The most common one which i know is using pipes.
Also grouping is also done like ( ls; date) where output of both the commands is displayed.
Are there any other ways of combining various... (2 Replies)
Discussion started by: rahulrathod
2 Replies