04-22-2013
I found the issue. I had made a mistake from the first to second line. There was supposed to be a space in front of Atom and I made the correction on the first line but not the second. I was also missing the #!. The other question I have concerns this temporary file. Is there going to be a problem with read/write access via all users other than root?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi...
I am quite new to Unix and would like an issue to be resolved.
I have a file in the format below;
4,Reclaim,ECXTEST02,abc123,Harry Potter,5432 6730 0327 5469,0603,,MC,,1200,EUR,sho-001,,1,,,abc123,1223
I would like my output to be as follows;
4,Reclaim,ECXTEST02,abc123,Harry... (4 Replies)
Discussion started by: Sho
4 Replies
2. Shell Programming and Scripting
Hi,
I have a string like this and i want to remove extra spaces that exists between the words.
Here is the sentence.
$string="The small DNA genome of hepadnaviruses is replicated by reverse transcription via an RNA intermediate. This RNA "pregenome" contains ... (2 Replies)
Discussion started by: vanitham
2 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I'm a newbie to shell scripting and I have the following problem:
I need all spaces between two letters or a letter and a number exchanged for an underscore, but all spaces between a letter and other characters need to remain. Searching forums didn't help...
One example for clarity:
... (3 Replies)
Discussion started by: Cpt_Cell
3 Replies
4. Shell Programming and Scripting
Hello..
I have a text file. I want to remove all the blank spaces(except tab) from the file..
I tried using sed command as shown below
sed 's/ //g' file1
But the problem with the above command is that it also eliminates 'tab' which is between the columns..
For example if the contents... (7 Replies)
Discussion started by: abk07
7 Replies
5. Shell Programming and Scripting
Hi everyone..
I'm trying to eliminate multiple whitespaces from a file..
I must make use of shell script to eliminate whitespaces..
Take a look at the sample file
1 int main()
2 {
3 int a,b;
4 printf("Enter the values of a and b");
5 scanf("%d%d",&a,&b);
6 if(a>b) ... (6 Replies)
Discussion started by: abk07
6 Replies
6. Shell Programming and Scripting
Hi I'm trying to remove blank spaces in expressions and function calls..
Consider the following example
printf ("Hello");
a = a + b;
I'm trying to eliminate space in between the function name and the opening brace. And also eliminate space between operators and operands..
That is, I'm... (19 Replies)
Discussion started by: abk07
19 Replies
7. Shell Programming and Scripting
HI,
I need the help from the experts like I have created one file with text like:
a b c d
e f g h
i j k l
So my question is that i have to write the script in which like in the first sentence it will take only one space after d and remove all the extra space in the end.I dont... (8 Replies)
Discussion started by: bhanudhingra
8 Replies
8. Shell Programming and Scripting
Hello All,
I have developed a script which takes following parameter from the input file to archive log files
1)Input Path
2)File pattern(*.csv)
3)Number of days(+1)
Following is the algorithm of my script
Read the input file
go to that path and search for particular n days older... (3 Replies)
Discussion started by: mitsyjohn
3 Replies
9. Shell Programming and Scripting
hi,
i need to remove the extra spaces in the filed.
Sample:
abc~bd ~bkd123 .. 1space
abc~badf ~bakdsf123 .. 2space
abc~bqed ~bakuowe .. 3space
output:
abc~bd ~bkd123 .. 1space
abc~badf~bakdsf123 .. 2space
abc~bqed~bakuowe .. 3space
i used the following command, (2 Replies)
Discussion started by: anshaa
2 Replies
10. Shell Programming and Scripting
Hello,
I have an xml file and my aim is to grab each line in keywords file and search the string in another file.
When keyword is found in xml file,I expect the script to go to previous line in the xml file and grab the string/value between two strings. It's almost working with an error.
tab... (6 Replies)
Discussion started by: baris35
6 Replies
MKFS(8) System Manager's Manual MKFS(8)
NAME
mkfs, mkext - archive or update a file system
SYNOPSIS
disk/mkfs [-aprv] [-n name] [-s source] [-u users] [-z n] proto ...
disk/mkext [-d name] [-u] [-h] [-v] file ...
DESCRIPTION
Mkfs copies files from the file tree source (default /) to a kfs file system (see kfs(4)). The kfs service is mounted on /n/kfs, and
/adm/users is copied to /n/kfs/adm/users. The proto files are read, and any files specified in them that are out of date are copied to
/n/kfs.
Each line of the proto file specifies a file to copy. Indentation is significant, with each level of indentation corresponding to a level
in the file tree. Fields within a line are separated by white space. The first field is the last path element in the destination file
tree. The second field specifies the permissions. The third field is the owner of the file, and the fourth is the group owning the file.
The fifth field is the name of the file from which to copy; this file is read from the current name space, not the source file tree. All
fields except the first are optional.
Names beginning with a are expanded as environment variables. If the first file specified in a directory is all of the files in that
directory are copied. If the first file is all of the files are copied, and all subdirectories are recursively copied.
Mkfs copies only those files that are out of date. Such a file is first copied into a temporary file in the appropriate destination direc-
tory and then moved to the destination file. Files in the kfs file system that are not specified in the proto file are not updated and not
removed.
The options to mkfs are:
a Instead of writing to a kfs file system, write an archive file to standard output, suitable for mkext. All files in proto, not just
those out of date, are archived.
n name Use kfs.name as the name of the kfs service (default kfs).
p Update the permissions of a file even if it is up to date.
r Copy all files.
s source
Copy from files rooted at the tree source.
u users
Copy file users into /adm/users in the new system.
v Print the names of all of the files as they are copied.
z n Copy files assuming kfs block n (default 1024) bytes long. If a block contains only 0-valued bytes, it is not copied.
Mkext unpacks archive files made by the -a option of mkfs. The -d option specifies a directory (default /n/kfs) to serve as the root of
the unpacked file system. The -u option, to be used only when initializing a new fs(4) file system, sets the owners of the files created
to correspond to those in the archive and restores the modification times of the files. (This is only permitted at the initial load of the
files into a file system.) Each file on the command line is unpacked in one pass through the archive. If the file is a directory, all
files and subdirectories of that directory are also unpacked. When a file is unpacked, the entire path is created if it does not exist.
If no files are specified, the entire archive is unpacked; in this case, missing intermediate directories are not created. The -v option
prints the names and sizes of files as they are extracted; -h prints headers for the files on standard output instead of unpacking the
files.
EXAMPLES
Make an archive to establish a new file system:
disk/mkfs -a -u files/adm.users -s dist proto > arch
Unpack that archive onto a new file system:
srv il!newfs
mount -c /srv/il!newfs /n/newfs
disk/mkext -u -d /n/newfs < arch
FILES
/lib/proto
directory of prototype files.
/lib/proto/portproto
generic prototype file.
SOURCE
/sys/src/cmd/disk/mkfs.c
/sys/src/cmd/disk/mkext.c
SEE ALSO
prep(8), kfscmd(8), wren(3), pip(8)
MKFS(8)