10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to modify a bash script to to take each line in a file and execute command. I currently have this:
#!/bin/bash if ; then echo "Lipsa IP"; exit; fi i=1 ip=$1 while ; do if ; then rand=`head -$i pass_file | tail -1` user=`echo $rand | awk '{print $1}'` pass=`echo $rand | awk '{print $2}'`... (3 Replies)
Discussion started by: galford
3 Replies
2. Shell Programming and Scripting
Hi all,
I am having a slight issue updating a file using perl from the command line I need some help with.
The item is:
DATA_FILE_TYPE=FULL
When I run the below command
/usr/bin/perl -p -i -e "s/DATA_FILE_TYPE=/DATA_FILE_TYPE=APPEND/g" processfile.cfg
It looks to be... (2 Replies)
Discussion started by: kstevens67
2 Replies
3. Shell Programming and Scripting
I have modified the .bashrc. The problem is that when I write a long command,
it does not write on the next line but continues to write on the same line.
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for... (1 Reply)
Discussion started by: kristinu
1 Replies
4. Shell Programming and Scripting
I have a script that currently runs fine and I need to add or || (or) condition to the if statement and I'm not sure the exact syntax as it relates to the use of brackets.
my current script starts like this:
errLog="/usr/local/website-logs/error.log"
apacheRestart="service httpd restart"... (3 Replies)
Discussion started by: jjj0923
3 Replies
5. UNIX for Dummies Questions & Answers
Hey all,
So I have an AWK command here
awk '{if(FNR==NR) {arr++;next} if($0 in arr) { arr--; if (arr == 0) delete arr;next}{print $0 >"list2output.csv"}} END {for(i in arr){print i >"list1output.csv"}}' list1 list2
(refer to image for a more readable format)
This code was submitted... (1 Reply)
Discussion started by: Aussiemick
1 Replies
6. Shell Programming and Scripting
I want to modify a file by deleting certain characters. The file looks like this:
>ctg86 org=S_bayanus] moltype=genomictg] ctgontig=ctg86]
RRRRRRRRRRRRRRRRRRRRRRRRRRRRTTTTTTTTTTTTTTTTTTTTTTTYYYYYYYYYYYYYYYYYYYYFFFFFFFFFFFGGGGGGGGGHHHHH
>ctg86 org=S_bayanus] moltype=genomictg] ctgontig=ctg86]... (4 Replies)
Discussion started by: phil_heath
4 Replies
7. UNIX for Dummies Questions & Answers
I am using Redhat 4.1.2, tcsh shell
To add a program to my path, I added the following line to my .cshrc file:
set path = (/home/R/R-2.11.0/bin/ /home/R/R-2.11.0/library)
It worked, I am able to run the program I wanted. But the pathway above overwrote all other existing paths - so I can no... (1 Reply)
Discussion started by: Euphoria
1 Replies
8. Shell Programming and Scripting
:)
Hi,
I use the following command to search for a string in all the files in the directories and sub directories.
find . -type f -print | xargs grep bermun@cial.net
Can someone please cite a method wherin I can find the entries from a list of 300-500 *.gz files by modifying the above... (2 Replies)
Discussion started by: openspark
2 Replies
9. Shell Programming and Scripting
Hi,
I want to change the login prompt from $ to something more explanatory like
(Username)(basename of pwd):
I also need to get this in a different font color.
Can someone pls tell me what I have to modify in my rc file. I m using CShell currently.
Would be great if u can give me... (7 Replies)
Discussion started by: mahatma
7 Replies
10. Shell Programming and Scripting
Hello,
I have installed a new program called chimera under the directory /usr/local/bin/chimera.
the executable is under the directory /usr/local/bin/chimera/bin/chimera.e
If i put myself under the latest directiry and I type ./chimera, the program works.
I would like to avoid this and I... (1 Reply)
Discussion started by: nico-hellas
1 Replies