12-16-2005
Number Swaping.... in file
I have a file having entries like 1270 (about 55000 entries like this). i want to swap these numbers like 2107... Any Idea
This User Gave Thanks to muneebr For This Post:
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Please any one can help me how to swap first 2 words in every line in a file using sed
Thankk you (4 Replies)
Discussion started by: web123
4 Replies
2. Shell Programming and Scripting
hi,
I am a begginer in unix and i want to know how to open a file and read it and separate the numbers & words and storing it in separate files, Using shell scripting.
Please help me out for this.
Regards
S.Kamakshi (2 Replies)
Discussion started by: kamakshi s
2 Replies
3. Shell Programming and Scripting
Is it possible to do this with sed?
Go from this:
958211 XXYYXXYYXX file1 file2 file3
958897 XXYYXXYYXX file1 file2
To this:
file1 file2 file3 XXYYXXYYXX 958211
file1 file2 XXYYXXYYXX 958897
The only thing consistant is XXYYXXYYXX. The numbers and files vary in length. I have seen I... (5 Replies)
Discussion started by: crowman
5 Replies
4. Shell Programming and Scripting
Hi Everybody,
I am trying to write a script that will get some perticuler data from a file and redirect to a file.
My Question is,
I have a Very huge file,In that file I have my required data is started from 25th line and it will ends in 100th line.
I know the line numbers, I need to get all... (9 Replies)
Discussion started by: Anji
9 Replies
5. Shell Programming and Scripting
I have a file with a list of config files numbered on the lefthand side 1-300. I need to have bash read each lines number and assign it to a variable so it can be chosen by the user called by the script later.
Ex. 1 some data
2 something else
3 more stuff
which number do you... (1 Reply)
Discussion started by: glev2005
1 Replies
6. UNIX for Dummies Questions & Answers
Hello Everyone.
I am trying to display contains of a file from a specific line to a specific line(let say, from line number 3 to line number 5). For this I got the shell script as shown below:
if ; then
if ; then
tail +$1 $3 | head -n $2
else
... (5 Replies)
Discussion started by: grc
5 Replies
7. Shell Programming and Scripting
Hi,
I have a set of files in a directory that I have to read and replace the first occurrence of a number with another dummy number. This is what I have so far but it does not seem to work. The files have lot of other data in each row and each data element is separated by ,@,
for file in... (13 Replies)
Discussion started by: scorpioraghu
13 Replies
8. Shell Programming and Scripting
Hi!
I just want to count number of files in a directory, and write to new text file, with number of files and their name
output should look like this,,
assume that below one is a new file created by script
Number of files in directory = 25
1. a.txt
2. abc.txt
3. asd.dat... (20 Replies)
Discussion started by: Akshay Hegde
20 Replies
9. Shell Programming and Scripting
Hi friends, here is my problem.
I have three files like this..
cat file1.txt
=======
unix is best
unix is best
linux is best
unix is best
linux is best
linux is best
unix is best
unix is best
cat file2.txt
========
Windows performs better
Mac OS performs better
Windows... (4 Replies)
Discussion started by: Jagadeesh Kumar
4 Replies
LEARN ABOUT REDHAT
usermount
USERMOUNT(1) General Commands Manual USERMOUNT(1)
NAME
usermount - A graphical tool to mount, unmount and format filesystems.
SYNOPSIS
usermount [ options ]
DESCRIPTION
usermount is a graphical tool to allow users to easily manage removable media, such as floppy disks or zip disks. When the tool starts up,
it scans /etc/fstab for all filesystems that have been configured to allow users to mount and unmount them. The filesystem can be mounted
or unmounted by pressing the toggle button labeled Mount.
Also, if the user has the appropriate permissions for the device, the Format button will be active. This allows the user to format disks
using fdformat and create a new filesystem of the type listed (using mkfs with the appropriate option). Naturally, the user will be
prompted for confirmation before actually destroying data on the device.
Note that if a device is already mounted, the format button is inactive for all entries that share the same device.
When run as root, usermount displays all of the entries in /etc/fstab rather than just the ones with the user option.
OPTIONS
This program has no command line options of it's own, but it does take the standard X program options like -display and such. See the X(1)
man page for some of the common options.
FILES
/etc/fstab The system file describing the mountable filesystems.
SEE ALSO
mount(8), fdformat(8), mkfs(8), fstab(5) X(1)
BUGS
Mount entries with a filesystem type of iso9660 are outright considered CD-ROMs and the format button is always disabled.
Mount entries for swap files or partitions are also ignored. A nice feature might be to allow root to turn swap on and off for swap parti-
tions.
AUTHOR
Otto Hammersmith <otto@redhat.com>
Red Hat Software 3 October 1997 USERMOUNT(1)