Hi,
i am using ubuntu 12.04 i working on scripting i want know how to change set of user passwords in shell scripting .
Hi,
I am working with a software that is based on Perl scripting and I have encountered with a bash scripting error. So as I am not familiar with bash scripting well, I don't know how I can solve.
sh: -c: line 1: syntax error near unexpected token `('
sh: -c: line 1: ` 32(andRlooks_unw'
It should be mentioned that my $SHELL is /bin/bash. Could you please guide me what '-c' is? where is it? if I change the shebang (the #!/bin/sh part) to #!/bin/bash, the problem will be solved?
Regards,
Zahra
hi,
I am newbie in Linux shell scripting.Can anybody help me to check the presence of file identified by variable in Shell scripting?
For example: I am reading the content of a file using while command as below:
"while read -r line
do
code block
done < file_name"
Now in this case every line in file gets stored in the variable 'line' one by one.Problem here is every line in the file is nothing but the file_path of another file say xyz.txt and I am checking presence of this xyz.txt file using below command:
if [-f $line]
as 'line' is the variable which stores file path of xyz.txt but it is not working. It is unable to check the presence of this xyz.txt file as i am addressing it with the variable 'line'.
Please help me.Thanks in advance.
I have reasonable experience in linux based systems. I want to learn a scripting language , can anyone out there suggest which one is the best to start with ? I would be grateful if anyone can provide me with links / books references as well ...
Hello guys !
I just ran into the word scripting Language while watching a movie.Is it different than a Programming language ? If yes, then how.
And please explain their usage.
Thanks in advance......
Hi All,
Is there any command or shell scripting to view only the link files under / .
Please tell me for shell script..
I m writing the script.
In that script i written the 1 function and in that function i have to write the contents in existing file
so i write,
cat > /etc/puppet/manifests/init.pp
{
ensure => present,
}
.
But it caanot write the changes in ssh machine
so what i can do in my script?
Please help me...
Ok yes this is a homework assignment BUT I am NOT looking to have the answers given to me. I am in the 6th week of my first Linux class ever and we are in our few weeks of beginning scripting. I have some ideas of what to do or where to start but not many and no one to bounce any ideas off...we are using UNIX Bash shell so any others I have no clue. The scenario is that I need a script that searches all my users home directories for bad words. I need the script to report to the screen certain info like username and word found and path. It should ask a user if it is good or bad and if bad be put into a file of list of bad file names, if good remove from list and no longer flagged by the script. What I have so far is wanting to somehow do a loop. I do know that if I do a grep -r -e kill -e steal /home/* I get a list of what I need. I also know that the list is separated by delimiters which I can pipe to get a variable for the things I need. I also know that I can put it to a file with a > filename.txt
What I have no clue is how to start a loop that would do this...
for each line in filename.txt
UNAME=...
LOC=...
TXT=...
echo "Username: $UNAME, Line with bad word found: $TXT, and Path and file name: $LOC. Is this a BAD file? (Y)"
Read YORN
if ["$YORN" = "Y" ]; then
>> (line of text from grep) badfiles.txt
fi
Next or whatever goes there...sorry if this is crazy I just really need some direction. I am trying to learn so please don't give me the answer...that will do nothing for me and I will not be able to explain the code I came up with.
can some1 please tell me ....i am writing script to display type of file....and i m not able to get what "filename##*\." means?....please be brief in your explanation..thank you
the program is like:
for filename in$(ls)
do
ext=${filename##*\.}
case '$ext' in
I'm new to linux but I use linux a little at school and by connecting through a shell at home. Anyways, I just installed linux a little while ago and I opened a shell and tried to compile some java code by going to the directory of the code and typing "javac someCode.java" like I do at school but it says the command is not found.
I previously had installed the java runtime environment and I just went to go and try to install the java development kit but it says it was already installed.
Is there some sort of path I need to set for the shell to look for the java compiler? Thanks in advance.
Edit:
I have added aliases to my .cshrc file at school and I just found a bashrc file and csh.cshrc file in the /etc folder. Sorry, I'm really new to all of this. Anyways, I'm geussing I have to edit the bash file? Can anyone point me to a good tutorial of scripting for these files???
How do i change the color for .pdf files ?
Can i do this from the shell without
changing the configuration files ?
mc --colors doc:white,black: