10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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)
Discussion started by: cmccabe
10 Replies
2. Shell Programming and Scripting
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)
Discussion started by: rramkrishnas
3 Replies
3. Shell Programming and Scripting
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)
Discussion started by: demmel
8 Replies
4. UNIX for Advanced & Expert Users
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)
Discussion started by: cokedude
0 Replies
5. Shell Programming and Scripting
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)
Discussion started by: lechelle
1 Replies
6. Shell Programming and Scripting
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)
Discussion started by: barrydocks
9 Replies
7. Shell Programming and Scripting
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)
Discussion started by: lastZenMaster
1 Replies
8. Shell Programming and Scripting
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)
Discussion started by: laurens
31 Replies
9. Shell Programming and Scripting
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)
Discussion started by: borgeh
0 Replies
10. Shell Programming and Scripting
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)
Discussion started by: JCR
1 Replies