Sponsored Content
Top Forums Shell Programming and Scripting Trying to modified files using sed command Post 302481426 by tukuyomi on Friday 17th of December 2010 12:42:22 PM
Old 12-17-2010
Code:
sed -i 's/#P PM3 Opt/nproc=2\n%chk=$n.chk\n#p B3LYP \/6-31G** opt/' *.gjf

New lines are \n in the code above Smilie
This User Gave Thanks to tukuyomi For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

chmod command for recently modified files

hello! is there a way for me to use the chmod command to change permissions for several files all at once -based on the fact that these files were all most recently modified TODAY ? I can't use a wildcard on their filenames because the filenames are varied. But I was hoping I could somehow do... (2 Replies)
Discussion started by: polka_friend
2 Replies

2. UNIX for Dummies Questions & Answers

how to retrieve original contents of a modified file (modified using vi)

Made changes to a file using vi editor and saved those changes now realised that the changes are not required How can I get the previous version of the file.i.e the one which was there on which I had made changes (3 Replies)
Discussion started by: novice100
3 Replies

3. UNIX for Dummies Questions & Answers

Help - Find command with list of files modified descending Order

Hi, I would like to know the command to get the files order in descending order with "FIND" command. Appreciate your help Thanks (4 Replies)
Discussion started by: TonySolarisAdmi
4 Replies

4. Shell Programming and Scripting

command to know files modified morethan 30 min

Hi, i use ksh and want to know the command for gettting the files which were not modified in last 30 min. find . -name <filename > -mtime 0.0209 is not giving the results. Thanks , Mohan (3 Replies)
Discussion started by: mohanpadamata
3 Replies

5. UNIX for Advanced & Expert Users

command for recently modified files - "find" command not working

I have three files a.txt , b.txt , c.txt in a directory called my_dir1 .These files were created before two or three months . I have a tar file called my_tar1.tar which contains three files a.txt , b.txt , d.txt . Somebody untarred the my_tar1.tar into my_dir1 directory. So existing two files were... (1 Reply)
Discussion started by: joe.mani
1 Replies

6. Shell Programming and Scripting

command to know last modified user of a file

Hi I have below requirement. There are set of files to be monitored for audit purpose. Source file contains the file name and its location on server. Need to have shell script which generate a output file which is having the details of above files ( last modified user name ,lat update... (12 Replies)
Discussion started by: karnatis
12 Replies

7. UNIX for Dummies Questions & Answers

Finding the modified timestamp of files from the piped output of du command

Version Info +++++++++++++++ RHEL 5.4 Since ls command lists file sizes in Bytes which can be long I use du command like below. I have run the du command for the below files as shown below. But I want pipe this output to ls command just to see the modified timestamp for these files. ... (7 Replies)
Discussion started by: kraljic
7 Replies

8. UNIX for Dummies Questions & Answers

Find command to get the modified files past 2 hours

Hello, How to get the modified/created files past 2 hours in Solaris with find command? Thank you. (7 Replies)
Discussion started by: balareddy
7 Replies

9. UNIX for Dummies Questions & Answers

Copy files from one drive to another, keeping most recently modified files

Hi all, I am a bit of a beginner with shell scripting.. What I want to do is merge two drives, for example moving all data from X to Y. If a file in X doesn't exist in Y, it will be moved there. If a file in X also exists in Y, the most recently modified file will be moved to (or kept) in... (5 Replies)
Discussion started by: apocolapse
5 Replies

10. UNIX for Dummies Questions & Answers

Du command and modified date in ssh

Hello, I am a new user to linux and having trouble completing this task. I want to list a directory of files and folders including the name, human readable size, and last modified date. So far I can get two of the three but not all together. For example: Using ls -lh gives me drwxr-xr-x... (7 Replies)
Discussion started by: Newuzer
7 Replies
ch_rc(1M)																 ch_rc(1M)

NAME
ch_rc - change system configuration file SYNOPSIS
root] {parameter|parameter=value}...] [file...] DESCRIPTION
manages the addition, modification, removal, and retrieval of information stored in files having the format of those in the directory. Parameter names are treated as strings. Thus, has no special meaning to in relation to other parameters named Options file Specify the file(s) to be used as the configuration database. If no file is specified, the set of files used by defaults to and all files in the directory. Modification and deletion of configuration parameters occurs in the file where the parameter is found. Add or modify a parameter definition. For each parameter specified on the command line, if the parameter is found in the specified (or default) files, it is modified to reflect the speci- fied value. If the parameter is not found, it is added to the specified file(s). If a new parameter is being defined, one or more files must be specified on the command line; the specified files are those in which the parameter will be defined. Remove a parameter definition. For each parameter name specified on the command line, remove any occurrence of that parameter from the specified file(s). List configuration values. For each parameter specified on the command line, output every definition of the parameter from the specified file(s). Output consists of only the values, one per line. Specify a parameter name or name/value pair. If a name and value is expected, but only a name is specified, the value will be set to the empty string. For example, specifying or will result in and respectively. Due to shell quoting rules, if you need a quoted parameter value, you must protect the quotes from the shell. For exam- ple, yields: which is an error, whereas, yields: Verbose. When used with the option, the option causes a verbose listing to be output. This listing includes a filename followed by the entire line containing the specified parameter for each occurrance of the parameter. The option is used to list all occurances of array parameters matching the parameters specified on the command line. For example, may emit the following output: Normally, the files specified on the command line are used as specified. By specifying a root directory with the option, all files (including the default files if none are specified) will be interpreted relative to root. For example, if root is specified as and is specified on the command line, it will be interpreted as RETURN VALUE
exits with one of the following values: 0 add/delete/list successful 1 command line syntax/usage error 2 can not access one or more of the listed (or default) files 3 can not open/create/write file 4 memory error 5 no files specified on command line for add option EXAMPLES
Files in the directory have the following format: WARNINGS
does not interpret configuration files; it only does pattern matching. As a result, if comments appear on lines containing parameter defi- nitions, the comments will also appear in output when using the option. cannot parse multiple parameter definitions which occur on the same line of a file. AUTHOR
was developed by HP. FILES
system configuration database driver file directory containing system configuration files SEE ALSO
rc.config(4). ch_rc(1M)
All times are GMT -4. The time now is 01:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy