12-11-2014
Thanks rubic and junior-helper. How can we insert to file using awk, ie similar to sed -i
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi guys and Gals AIX 5.1
If I had a # above several scripts would it comment out everything below it?
Like this
#
01 2 ** .....................................
02 31 .........................................
# this is a script
03 12 **..........................
Would... (6 Replies)
Discussion started by: rocker40
6 Replies
2. Shell Programming and Scripting
Hi I need to add a comment line at the begining of a text file. The scenario is given below.
1. The number of servers that needs to be updated is around 80
2. The location of the text file in all the servers are the same including the file name.
3. The comment has to be added at the very... (2 Replies)
Discussion started by: orakhan
2 Replies
3. Shell Programming and Scripting
I need help with a script. Here's what I want to do.
I have a file "upsrk.txt" which can be either under "/home/upsrk" OR "/home/oracle"
On some systems file "upsrk.txt" may not exist, in that case I want to just exit out of the script.
If the file is there, I want to check if I have the... (3 Replies)
Discussion started by: upsrk
3 Replies
4. UNIX for Dummies Questions & Answers
Is there a command to put a comment (#) in a whole part of a shell script? (5 Replies)
Discussion started by: vero_81
5 Replies
5. Shell Programming and Scripting
#!/bin/bash
repository=$1;
txn=$2;
#echo -e "\n\npre-hook Script called\n\n";
logmsg=$(svnlook log ${repository} -t ${txn});
logmsg_vals="${logmsg%%|*}|";
logmsg_char="${logmsg_vals:0:1}";
logmsg_len=$(echo ${logmsg} | cut -d' ' -f1); #
logmsg_len2=$(echo ${logmsg} | awk '{print... (1 Reply)
Discussion started by: anuragpgtgerman
1 Replies
6. Shell Programming and Scripting
Hi,
i need some help. i am not sure about my idea.
I have a script directory under my home directory,which has a lot of scripts in it.
These are some names of the scripts in /axxhome/prdv/script
aly300.sh
axt300.sh
arv300.sh
clp300.sh
ctth300.sh
aly400.sh
axt400.sh
arv400.sh... (6 Replies)
Discussion started by: debu000
6 Replies
7. UNIX for Dummies Questions & Answers
- Concatenate files and delete source files. Also have to add a comment.
- I need to concatenate 3 files which have the same characters in the beginning and have to remove those files and add a comment and the end.
Example:
cat REJ_FILE_ABC.txt REJ_FILE_XYZ.txt REJ_FILE_PQR.txt >... (0 Replies)
Discussion started by: eskay
0 Replies
8. Shell Programming and Scripting
Hello,
I have a file, in which line 40 is commented. It is basically a cron job,
#05,35,50 * * * * /usr/local/scripts/my.sh
how i can i verify the line 40 is commented, if not then give me message not commented, otherwise provide us message it is commented. (5 Replies)
Discussion started by: learnbash
5 Replies
9. Shell Programming and Scripting
Dear All,
I have to find a way to reorganize a table file according to the last column. The input file looks like this:
cat Input1.txt:
ID:12:23:00Q EU232 2342 234 123 231 aa1;ab2
ID:11:22:00E EU112 1232 211 112 233 ab2;ac3
ID:19:24:00S EU121 569 ... (7 Replies)
Discussion started by: loba
7 Replies
10. Shell Programming and Scripting
Hi All,
totally new on it , normally use it for just 1 line.
i'm looking for help.
i'm have 2 file.
file 1 :
--------------------------------------------------
c12
c1
c3
--------------------------------------------------
file 2:
other content ... (10 Replies)
Discussion started by: kttan
10 Replies
LEARN ABOUT DEBIAN
approx-import
APPROX-IMPORT(8) System Manager's Manual APPROX-IMPORT(8)
NAME
approx-import - copy local .deb files into the approx cache
SYNOPSIS
approx-import [OPTION]... file.deb ...
DESCRIPTION
approx-import copies local .deb files, such as those found in /var/cache/apt/archives, into the approx(8) cache.
It does so by computing the MD5 checksum of each argument. If it matches a package in one of the Packages files in the approx(8) cache,
then the file is copied to the appropriate location in the cache.
Note that all Packages files must be scanned, regardless of how many .deb files are being imported, and this process may take several min-
utes.
The approx-import command must be run by the superuser or the approx(8) user.
OPTIONS
-c file, --config file
Specify an additional configuration file. May be used multiple times.
-s, --simulate
Process files but do not actually copy them into the cache.
-q, --quiet
Don't print the names of files that are imported.
-v, --verbose
Print the disposition of each file.
EXAMPLES
To import packages from the local apt(8) cache:
approx-import /var/cache/apt/archives/*.deb
To import packages from another proxy's cache:
find other-cache -name "*.deb" | xargs approx-import
(where other-cache is the pathname of the other proxy's cache directory)
FILES
/etc/approx/approx.conf
Configuration file for approx and related programs.
/var/cache/approx
Default cache directory for archive files.
SEE ALSO
approx.conf(5), approx(8)
AUTHOR
Eric Cooper <ecc@cmu.edu>
June 2010 APPROX-IMPORT(8)