are you trying to do yourself, or as part of automated script function
To do yourself, use your editor, such as vi.
Or, as part of a script would be potentially more involved. And would require a little more info on your intent.
That tells me that there is a reference to the word VERSION at the 32nd line in my file. By combining head and tail commands, I can extract a subset of my original file.
Hello,
I need to search in file2 for
class A : public B
{
and insert right after that the content of file1.
I am a bit lost as to which tools (which bash functions, awk...). I should use. Thanks for some directions here.
Regards (1 Reply)
I have a file that I want to split in 2 (with Bourne shell sh) preferably. The file consists of groups of lines separated by newline. The file can vary in length, so I need to check number of groups of text. Here's an example
====EXAMPLE START====
#fruit banana
#color yellow
#surface smooth... (0 Replies)
Hi all,
I need to create a bash script that reads a txt file on a remote (Windows 2003) server, gets the IP-addresses out of it and then fetches the folders to copy out of another txt file. (all files are auto-generated) The IP addresses that don't have a folder_list file should be ignored. At... (31 Replies)
Hello, I am using tcsh on AIX.
I would like to write a script that does the following:
1. given an inode, how do I find exactly the name of the file?
I know I could do this using ls -i | grep <inode>
but it returns: <inode> <filename>. I need some string manipulation or something to... (1 Reply)
I use zentyal for my server admin, which is great but zentyal auto-generates config file on boot and hence overwrites any changes made directly to config files. In order to allow multiple user access to a MS ACCESS database, I need to customise the smb.conf file and add the following line to the... (9 Replies)
Hi,
I have this problem on how to place the cursor in a text editor (for example: pico).
I made this script that would attach comments to a script file then open the script file,
I would like to know how to place the cursor in a specific place,
for example at the end of the comments,
... (1 Reply)
This took me quite awhile to find so I wanted to share this with other people.
To switch windows in vimdiff or
to navigate windows in vimdiff or
to change windows in vimdiff try the following:
The ":vertical" command can be inserted before another command that
splits a window.
... (0 Replies)
Hello,
I'm trying to create multiple commands using a variable input from another file but am not getting any successful results.
Basically, file1.txt contains multiple lines with single words:
<file1.txt>
yellow
blue
black
white
I want to create multiple echo commands with these... (8 Replies)
Hi,
I have an issue converting decimal places of a particular column, i am using below script to get the output, but the output is not generating in desired format.
awk -F"," 'BEGIN{OFS=","}{if(NR==0)getline;if ($7 != "") {if ($7 > 0) $7=$7/100 ; {printf "%.2f"... (3 Replies)
I am trying to use awk to place the contens of a filename in $1 and $2 followed by the data in the text file. Basically, put the filename within the text file. There are over 1000 files in the directory and as of now each file is saved with a unique name but it is not within the file. Thank you... (10 Replies)