Search Results

Search: Posts Made By: kelseyh
3,509
Posted By kelseyh
No just something i need for a project.
No just something i need for a project.
3,509
Posted By kelseyh
Script to return first x characters from file
I need a script to read the first 1000 characters of a text file regardless of how many lines it will span. So if my first line has 2000 characters i only want the first 1000 from this line, if my...
8,434
Posted By kelseyh
I get seq: command not found
I get seq: command not found
8,434
Posted By kelseyh
Controlled For Loop
I have a for loop and i pass in number of times i want to loop as argument to script.


I have attached a snippet of my script. Problem is this does not work, if I manually replace the...
6,215
Posted By kelseyh
Recursive List File Permissions
How can I recursively list file permission including all subdirectories and save the result to a file. I also want to exclude certain file type. All I need is the UID and GID of each of the files.
2,340
Posted By kelseyh
Recursive List File Permissions
How can I recursively list file permission including all subdirectories and save the result to a file. I also want to exclude certain file type such as *.log.
All I need is the UID and GID of...
1,979
Posted By kelseyh
Nice. Can you also do range so print columns 5 to...
Nice. Can you also do range so print columns 5 to 20.

---------- Post updated at 03:41 AM ---------- Previous update was at 03:14 AM ----------

Forgot that how do i print substring from each...
1,979
Posted By kelseyh
Extract File line and manipulate
How can I print a section of each line in a text file. Eg

CODE1 XYR Test2 10319389
CODE2 XYR Test2 10319389
CODE3 XYR Test2 10319389
CODE4 XYR Test2 10319389
CODE5 XYR Test2 10319389
...
2,821
Posted By kelseyh
How do i run this in a script and assing it to a...
How do i run this in a script and assing it to a variable.

I try something like:

numVal=`awk '/COD1/&&++c==3{print NR}' infile`

And get the following error when running script
...
2,821
Posted By kelseyh
Line Number Script
If i have text file how do i find the line with the nth occurance of a certain string, so in example below i want line number of 3rd occurance of COD1 which should be line 7

COD1
COD2
COD2...
1,974
Posted By kelseyh
File Line Extract
If i have a file, how do i create a new file with say line x to y from the file i have. Eg. File1 has 100 line, i want File2 to have line 50-60 from File1
4,243
Posted By kelseyh
I am processing each line, so i need to need to...
I am processing each line, so i need to need to do it another way
4,243
Posted By kelseyh
Read file line spaces
I have a script which read a file it does
while read -r line, then i echo line out
echo "$line"

Problem is the echo does not echo space and tabs at the end of each line. How do i get the end...
2,022
Posted By kelseyh
Date manipulation
How can i print a future time, so i get current time by date "+%H:M" but how can i say add 20 minutes to the current time and display as I have just done for current time.
2,892
Posted By kelseyh
Thanks that works perfectly. Instead of echoing...
Thanks that works perfectly. Instead of echoing how can i write all the contents to a file.
2,892
Posted By kelseyh
CODE A_123 TEXT TEXT VAL 1,2,3 TEXT ...
CODE A_123
TEXT
TEXT
VAL 1,2,3
TEXT
CODE A_321
TEXT
TEXT
VAL 1,2,3
would become:

CODE A_123
TEXT
TEXT
VAL 1,5,2
TEXT
CODE A_321
TEXT
TEXT
VAL 5,6,7
2,892
Posted By kelseyh
Script Search replace - complicated
I have a text file for which i need a script which does some fancy search and replace.
Basically i want to loop through each line, if i find an occurance of certain string format then i want to...
Showing results 1 to 17 of 17

 
All times are GMT -4. The time now is 02:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy