09-01-2009
Quote:
Originally Posted by
sarbjit
Note you can't directly modify a file, you have to redirect it to other file
you can... but not with "sed" which is the "
stream
editor". but you can use "ed" to alter a file directly. afaik it uses the same syntax as "sed"!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I have some script that creates a temp csv file. What I need to do is do some search and replace and modify the file from my shell script. I know the commands to open the file and then apply the reg ex but wasnt sure how I could do this from a script and modify the file?
Any help... (2 Replies)
Discussion started by: not4google
2 Replies
2. Shell Programming and Scripting
hi all,
i am new to UNIX. this is my first time using Ubuntu. i need to do this for my fyp.
i am using an artificial neural network model to predict the yield strength of steel. the shell script used to execute this model is as shown here:
#Thomas Sourmail, Cambridge University /... (4 Replies)
Discussion started by: dakkorn
4 Replies
3. Shell Programming and Scripting
Hi users,
I am on a beginner level and just joined this site.
I have created a simple .ksh file in the following manner
cat <<EOF >mfile
#!/bin/ksh
echo "hello world"
EOF
Request for some help with 2 cases
1. now i would like to add a second line after the first echo command... (4 Replies)
Discussion started by: corbusier
4 Replies
4. Shell Programming and Scripting
Hi freinds
I have a small problem I want u to help me in, I have a syslog server and configured it to send me email automatically, I get a small perl script to help me in, and tested it to send alerts to root and it worked successfully without any problems
Now I want to send it outside, I... (4 Replies)
Discussion started by: reaky
4 Replies
5. UNIX for Dummies Questions & Answers
Hi all,
I really wan't to know that how to edit a shell script with out using an editor..
Is there any command? (4 Replies)
Discussion started by: buddhi
4 Replies
6. Shell Programming and Scripting
Hello,
I have a shell script which calls for an existing script with appropriate parameters. It looks something like this.
--------------------------------------------------------------------------
#!/bin/bash
sh /root/ams_rc stop_shepherd > /dev/null
sleep 30
sh /root/ams_rc... (9 Replies)
Discussion started by: Siddheshk
9 Replies
7. Shell Programming and Scripting
I have the records in the format
one row
0009714494919I MY010727408948010 NNNNNN N PUSAAR727408948010 R007YM08705 9602002 S 111+0360832-0937348
I want to get it int the format
0009714494919I MY010727408948010 NNNNNN N PUSAAR727408948010 R007YM08705 9602002 S ... (2 Replies)
Discussion started by: sonam273
2 Replies
8. 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
9. Shell Programming and Scripting
Hello all,
I have a Kconfig file that looks like something below ...
================================
menu "Application type"
config GUI_TYPE_STANDARD
bool "Standard Application"
source "cfg/config/std.in"
source... (12 Replies)
Discussion started by: anand.shah
12 Replies
10. 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
LEARN ABOUT DEBIAN
update-cracklib
update-cracklib(8) System Manager's Manual update-cracklib(8)
NAME
update-cracklib - Regenerate cracklib dictionary
SYNOPSIS
update-cracklib
DESCRIPTION
update-cracklib builds a compressed and accumulated version of wordlists stored in the directories given in cracklib's configuration file
/etc/cracklib/cracklib.conf. Programs using cracklib2 need this database to be of any use.
By default this script is called by cron every day.
RESULT
update-cracklib prints out two numbers: the number of words read from the ASCII dictionaries and the number of words eventually written
into the cracklib database; if no error occurred, these should be equal.
0 is returned on success, otherwise an error message is printed to standard error and -1 is returned.
FILES
/etc/cracklib/cracklib.conf
shell script that sets cracklib_dictpath_src which must be a space separated list of source dictionary files.
SEE ALSO
cracklib(3), crack_mkdict(8)
AUTHOR
This program and manual page was written by Martin Pitt <martin@piware.de> for the Debian GNU/Linux System (but may be used by others).
Martin Pitt June 09, 2003 update-cracklib(8)